🖋️ Text Formatting Tags

Last Updated: 01 Nov 2025


Formatting tags are used to style or highlight text directly in HTML. They change how the text looks (bold, italic, underlined, etc.) or how it is understood by search engines and screen readers.


Formatting Tags List

  • <b>: Bold text
  • <strong>: Important text (bold and important)>
  • <u>: Underlined text
  • <ins>: Inserted text
  • <i>: Italic text
  • <em>: Emphasized text
  • <del>: Deleted text
  • <sup>: Superscript text
  • <sub>: Subscript Text
  • <mark>: Highlighted text
  • <small>: Smaller text
  • <big>: Bigger text
  • <abbr>: Abbreviation
  • <pre>: Preformatted text
  • <code>: Computer code

Example :

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Formatting Tags Example</title>
  </head>
  <body>
    <h1>HTML Text Formatting</h1>
    <b>This is a bold word.</b>
    <p>This is a <b>bold</b> word.</p>
    <p>This is a <strong>very important</strong> statement.</p>
    <p>This is an <i>italic</i> word.</p>
    <p>This is an <em>emphasized</em> sentence.</p>
    <p>This is a <small>small note</small>.</p>
    <p>This is <del>deleted</del> and <ins>inserted</ins> text.</p>
    <p>Chemistry: H<sub>2</sub>O — Water</p>
    <p>Maths: 2<sup>3</sup> = 8</p>
    <p>This is a <mark>highlighted</mark> word.</p>
    <p>This is a <small>small</small> <big>big</big> word</p>
    <p>
      <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
    </p>
    <pre>
A preformatted block of text
Hi there!
        HTML is fun!</pre
    >
    <code>var name = "Amit";</code>
  </body>
</html>

🗣 Hinglish Tip: <strong> aur <em> SEO aur accessibility ke liye better hote hain, kyunki unka meaning bhi browser samajhta hai.

  • You Can use <br/> tag to break a line and <hr/> tag to add a horizontal line.

🧠 Quick Practice

  • Create a file named formatting.html.
  • Write a small article with at least 8 formatting tags from this lesson.
  • Exercise