HTML Text Formatting Tags – Bold, Italic, Strong, Em, Mark Explained



 

 

Definition of HTML Formatting Tags

HTML formatting tags are special tags used to format text on a webpage. They help make text bold, italic, underlined, highlighted, smaller, or important so the content looks clear and attractive to readers.

These tags improve both readability and page structure.

Common HTML Formatting Tags

  • <b> – Makes text bold
    Example: <b>Hello</b>Hello

  • <strong> – Shows important text (usually bold)
    Example: <strong>Important</strong>

  • <i> – Makes text italic
    Example: <i>Hello</i>Hello

  • <em> – Emphasized text (usually italic)
    Example: <em>Welcome</em>

  • <u> – Underlines text
    Example: <u>HTML</u>

  • <mark> – Highlights text
    Example: <mark>Highlighted text</mark>

  • <small> – Displays smaller text
  • <del> – Shows deleted text with a line through it
  • <sub> – Subscript text

  • Example: H<sub>2</sub>O
  • <sup> – Superscript text
    Example: x<sup>2</sup>

Example

<p>This is <b>bold</b> text.</p>
<p>This is <i>italic</i> text.</p>
<p>This is <u>underlined</u> text.</p>
<p>This is <mark>highlighted</mark> text.</p>

Post a Comment

0 Comments