Format the HTML content
- 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:
<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:
<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:
<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:
<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:
<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:
<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:
<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.

<h1>Heading no. 1</h1>
<h2>Heading no. 2</h2>
<h3>Heading no. 3</h3>
<h4>Heading no. 4</h4>
<h5>Heading no. 5</h5>
<h6>Heading no. 6</h6>
Comments