top of page

Format the HTML content

  • Writer: Mahesh Bhat M
    Mahesh Bhat M
  • Jun 26, 2017
  • 2 min read



1) Bold Text


If you write anything within <b>............</b> element, is shown in bold letters.


See this example:

  1. <p> <b>Write Your First Paragraph in bold text.</b></p>


Output: Write Your First Paragraph in bold text.


2) Italic Text


If you write anything within <i>............</i> element, is shown in italic letters.


See this example:

  1. <p> <i>Write Your First Paragraph in italic text.</i></p>

Output: Write Your First Paragraph in italic text.


3) Underlined Text


If you write anything within <u>.........</u> element, is shown in underlined text.


See this example:

  1. <p> <u>Write Your First Paragraph in underlined text.</u></p>


Output: Write Your First Paragraph in underlined text.


4) Superscript Text


If you put the content within <sup>..............</sup> element, is shown in superscript ; means it is displayed half a character's height above the other characters.


See this example:

  1. <p>Hello <sup>Write Your First Paragraph in superscript.</sup></p>


5) Subscript Text

If you put the content within <sub>..............</sub> element, is shown in subscript ; means it is displayed half a character's height below the other characters.


See this example:

  1. <p>Hello <sub>Write Your First Paragraph in subscript.</sub></p>


6) Larger Text

If you want to put your font size larger than the rest of the text then put the content within <big>.........</big>. It increase one font size larger than the previous one.

See this example:

  1. <p>Hello <big>Write the paragraph in larger font.</big></p>


7) Smaller Text

If you want to put your font size smaller than the rest of the text then put the content within <small>.........</small>tag. It reduces one font size than the previous one.

See this example:

  1. <p>Hello <small>Write the paragraph in smaller font.</small></p>



HTML Heading :-

A HTML heading or HTML h tag can be defined as a title or a subtitle which you want to display on the webpage.


When you place the text within the heading tags <h1>.........</h1>, it is displayed on the browser in the bold format and size of the text depends on the number of heading.


There are six different HTML headings which are defined with the <h1> to <h6> tags.


h1 is the largest heading tag and h6 is the smallest one.


  1. <h1>Heading no. 1</h1>

  2. <h2>Heading no. 2</h2>

  3. <h3>Heading no. 3</h3>

  4. <h4>Heading no. 4</h4>

  5. <h5>Heading no. 5</h5>

  6. <h6>Heading no. 6</h6>










Comments


Recent Posts

© 2023 by Kathy Schulders. Proudly created with Wix.com 

  • Grey Twitter Icon
bottom of page