HTML Formatting Tags

HTML Formatting Tags

HTML formatting tags are to indicate how text can appear in HTML documents. HTML contains several elements for defining text with a special meaning.

HTML Formatting tags are as follows:-

  1.  <b> – Bold text
  2.  <strong> – Important text
  3. <i> – Italic text
  4. <em> – Emphasized text
  5. <u> – Underlined Text
  6. <mark> – Marked text
  7. <big> – Larger text
  8. <small> – Smaller text
  9. <s> or <strike> – Strike Text
  10. <del> – Deleted text
  11. <ins> – Inserted text
  12. <sub> – Subscript text
  13. <sup> – Superscript text
  14. <abbr>Text Abbreviation

HTML formatting Elements in details:-

1. Bold text <b> Element :-

Any content that appears within <b>…</b> element, is displayed as only bold text.

Example:-  <b>This text is bold</b>

Result:    This text is Bold


2. Important text <strong> Elements :-

 Any content that appears within <strong>…</strong> element is displayed as important text and also displayed in bold. The HTML <strong> element defines text with strong importance in web page.

Example: <strong> This content has more importance </strong>

Result:  This content has more importance


3. Italic text <i> Elements :-

Any text that appears within <i>…</i> element is displayed in italic. The <i> element defines a part of text in an alternate voice or mood.

Tip: HTML <i> element is often used to indicate a technical term, a phrase from another language,  a ship name, a thought, etc.

Example:    <i> This is italic text </i>

Result:       This is italic text 


4. Emphasized text <em> Elements :-

Any content that appears within <em>…</em> element is displayed as emphasized and italic text.

Example:  <em> This is emphasized text </em>

Result:       This is emphasized text


5. Underlined Text <u> Elements :-

Any text that appears within <u>…</u> element, is displayed with an underline.

Example: <u> This text is underline text </u>

result: This text is underline text


6. Marked text <mark> Elements :-

Any content that appears with-in <mark>…</mark> html element, is displayed as marked with yellow ink.

Example: <mark> This text is marked with yellow color. </mark>

Result:  This text is marked with yellow color.


7.Larger text <big> Elements :-

Any Content that appears with <big>…</big>  HTML element is displayed one font size larger than the other text of the text surrounding it as shown below:

Example: <p>This text is <big>Larger text </big> in this paragraph</p>

Result:      This text is Larger text in this paragraph.


8. Smaller text <small> Elements :-

Any Content that appears with <small>…</small> element is displayed one font size smaller than the rest of the text surrounding it as shown below:

Example: <p>This text is <small> smaller text </small> in this paragraph</p>

Result:      This text is smaller text in this paragraph.


9. Strike Text  <s> OR <strike> Elements :-

Any Content that appears with <s>..</s> element, specifies the text that is no longer correct, accurate or relevant.

Tip:- The <strike> tag was used in HTML 4 to define strikethrough text.

Example: <s> This text is strikethrough text. </s>

Result:  This text is strikethrough text.


10.Deleted text <del> Elements :-

The <del> tag is used to identify text that has been deleted from a document but retained to show the history of modifications made to the document. Pair a <del> element with an <ins> element to identify the inserted text that replaced the deleted text.

Example: <del> This text is strikethrough text. </del>

Result:  This text has been deleted from document.


11.Inserted text <ins> Elements :-

Any content that appears within <ins>…</ins> element is displayed as inserted text. A text with a deleted part, and a new, inserted part.

Example: <p>My favorite fruit is <del>banana</del> <ins>Apple</ins>!</p>

Result:     My favorite fruit is banana Apple!


12. Subscript text <sub> Elements :-

Any content that appears within <sub>…</sub> element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a character’s height beneath the other characters.

Example:    <p>X<sub>2</sub></p>

Result: X2


13.Superscript text <sup> Element:-

Any content that appears within <sup>…</sup> element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a character’s height above the other characters.

Example:    <p>X<sup>2</sup></p>

Result: X2


14.Text Abbreviation <abbr> Elements:-

You can abbreviate any text with <abbr> elements. And use the global “title” attribute to show the description for the abbreviation when mouse pointer over the element.

Example:  <p>The <abbr title=”Hypertext Markup Language>HTML</abbr> is a markup language.<p>

Result: The HTML is a markup language.


Other Useful Article for you as show below:-