HTML/HTML Basics

HTML Text Formatting

Updated on January 6, 2026
1 min read

What is Text Formatting in HTML?

Text formatting tags are used to change the appearance or meaning of text

They help make content clear, important, and readable.

Bold Text

1. <b> Tag

Makes text bold (for design only).

<b>Bold Text</b>

2. <strong> Tag

Makes text bold and shows importance.

<strong>Important Text</strong>

Italic Text

1. <i> Tag

Makes text italic (style only).

<i>Italic Text</i>

2. <em> Tag

Italic + emphasis/meaning.

<em>Emphasized Text</em>

Underline Text

<u> Tag

Underlines the text.

<u>Underlined Text</u>

Small Text

<small> Tag

Makes text smaller.

<small>Small Text</small>

Line Break

<br> Tag

Moves text to a new line (no closing tag).

Hello<br>World

Horizontal Line

<hr> Tag

Draws a horizontal line.

<hr>

Example with All Formatting

html
1<p>
2  <strong>HTML</strong> is 
3  <i>easy</i> and 
4  <u>useful</u> for 
5  <small>beginners</small>.
6</p>

Important Tips 

  1. Use <strong> and <em> for meaning
  2. Use <b> and <i> for design
  3. Use formatting inside <p> tag

One Line to Remember

Formatting tags improve text appearance and meaning

HTML Text Formatting | HTML | Learn Syntax