Understanding code made easy

Post Top Ad

Your Ad Spot

Friday, June 5, 2020

HTML Formatting Tags (Everything you need to know)


HTML Formatting Elements:

Formatting elements are designed to display special types of text.
Types of formatting available in HTML:
1.  <b> - Bold text
2.  <i> - Italic text
3.  <u> - underline text
4.  <strong> - Important text
5.  <em> - Emphasized text
6.  <mark> - Marked text
7.  <small> - Smaller text
8.  <del> - Deleted text
9.  <ins> - Inserted text
10.  <sub> - Subscript text
11. <sup> - Superscript text

1. <b> - Bold text:
Anything that appears within <b>...</b> element is displayed in bold as shown in below example.
<b>This text is bold</b>
Output:
This text is bold

2. <i> - Italic text:
Anything that appears within <i>...</i> element is displayed in italicized as shown in below example.
<i>This text is italic</i>
Output:
This text is italic

3. <u> - underline text:
Anything that appears within <u>...</u> element, is displayed with underline as shown in below example.
<u>This text is underlined</u>
Output:
This text is underlined

4. <strong> - Important text:
The HTML <strong> element defines strong text, with added semantic "strong" importance.
<strong>This text is strong</strong>
Output:
This text is strong

5.  <em> - Emphasized text:
The HTML <em> element defines emphasized text, with added semantic importance.
<strong>This text is emphasized</strong>
Output:
This text is emphasized

6.  <mark> - Marked text:
The HTML <mark> element defines marked/highlighted text as shown in below example.
This text is <mark>marked</mark>
Output:
This text is marked

7.  <small> - Smaller text:
The HTML <small> element defines smaller text as shown in below example.
<h1>This text is<small>small</small>
</h1>
Output:
This text is small

8.  <del> - Deleted text:
The HTML <del> element defines deleted/removed text as shown in below example.
<p>My favorite color is <del>blue</del> red.</p>
Output:
My favorite color is blue red.

9.  <ins> - Inserted text:
The HTML <ins> element defines inserted/added text as shown in below example.
<p>My favorite <ins>color</ins> is red.</p>
Output:
My favorite color is red.

10.  <sub> - Subscript text:
The HTML <sub> element defines subscripted text as shown in below example.
<p>This is <sub>subscripted</sub> text.</p>
Output:

This is subscripted text.

11. <sup> - Superscript text:
The HTML <sup> element defines superscripted text.
<p>This is <sup>superscripted</sup> text.</p>
Output:

This is superscripted text.


Conclusion:
You’ve learned how to create different formatting tags in HTML from the above article. Thus learning this tags in HTML will create a great backbone to you web development career.

Happy learning !


No comments:

Post a Comment

Comments