10/4/25, 7:22 AM HTML Text Formatting
Tutorials References Exercises Get Certified
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
HTML Text Formatting
❮ Previous Next ❯
HTML contains several elements for defining text with a special meaning.
Example
This text is bold
This text is italic
This is subscript and superscript
Try it Yourself »
HTML Formatting Elements
Formatting elements were designed to display special types of text:
<b> - Bold text
<strong> - Important text
<i> - Italic text
<em> - Emphasized text
<mark> - Marked text
<small> - Smaller text
[Link] 1/9
10/4/25, 7:22 AM HTML Text Formatting
<del> - Deleted text
Tutorials References
<ins> - Inserted text
Exercises Get Certified
<sub> - Subscript text
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
<sup> - Superscript text
HTML <b> and <strong> Elements
The HTML <b> element defines bold text, without any extra importance.
Example
<b>This text is bold</b>
Try it Yourself »
The HTML <strong> element defines text with strong importance. The content inside is
typically displayed in bold.
Example
<strong>This text is important!</strong>
Try it Yourself »
REMOVE ADS
HTML <i> and <em> Elements
The HTML <i> element defines a part of text in an alternate voice or mood. The content
inside is typically displayed in italic.
Tip: The <i> tag is often used to indicate a technical term, a phrase from another language,
a thought, a ship name, etc.
[Link] 2/9
10/4/25, 7:22 AM HTML Text Formatting
Tutorials
Example
References Exercises Get Certified
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
<i>This text is italic</i>
Try it Yourself »
The HTML <em> element defines emphasized text. The content inside is typically displayed
in italic.
Tip: A screen reader will pronounce the words in <em> with an emphasis, using verbal
stress.
Example
<em>This text is emphasized</em>
Try it Yourself »
HTML <small> Element
The HTML <small> element defines smaller text:
Example
<small>This is some smaller text.</small>
Try it Yourself »
HTML <mark> Element
The HTML <mark> element defines text that should be marked or highlighted:
[Link] 3/9
10/4/25, 7:22 AM HTML Text Formatting
Tutorials
Example
References Exercises Get Certified
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
<p>Do not forget to buy <mark>milk</mark> today.</p>
Try it Yourself »
HTML <del> Element
The HTML <del> element defines text that has been deleted from a document. Browsers
will usually strike a line through deleted text:
Example
<p>My favorite color is <del>blue</del> red.</p>
Try it Yourself »
HTML <ins> Element
The HTML <ins> element defines a text that has been inserted into a document. Browsers
will usually underline inserted text:
Example
<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>
Try it Yourself »
HTML <sub> Element
[Link] 4/9
10/4/25, 7:22 AM HTML Text Formatting
The HTML <sub> element defines subscript text. Subscript text appears half a character
Tutorials References Exercises Get Certified
below the normal line, and is sometimes rendered in a smaller font. Subscript text can be
used for chemical formulas, like H2O:
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
Example
<p>This is <sub>subscripted</sub> text.</p>
Try it Yourself »
HTML <sup> Element
The HTML <sup> element defines superscript text. Superscript text appears half a character
above the normal line, and is sometimes rendered in a smaller font. Superscript text can be
used for footnotes, like WWW[1]:
Example
<p>This is <sup>superscripted</sup> text.</p>
Try it Yourself »
?
Exercise
Two of the following HTML elements makes the text bold, which two?
<em> and <b>
<strong> and <b>
<big> and <b>
<mark> and <b>
[Link] 5/9
10/4/25, 7:22 AM HTML Text Formatting
Tutorials References Exercises
Submit Answer »
Get Certified
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
HTML Text Formatting Elements
Tag Description
<b> Defines bold text
<em> Defines emphasized text
<i> Defines a part of text in an alternate voice or mood
<small> Defines smaller text
<strong> Defines important text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text
<mark> Defines marked/highlighted text
For a complete list of all available HTML tags, visit our HTML Tag Reference.
Video: HTML Formatting
[Link] 6/9
10/4/25, 7:22 AM HTML Text Formatting
Tutorials References Exercises Get Certified
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
❮ Previous Next ❯
COLOR PICKER
[Link] 7/9
10/4/25, 7:22 AM HTML Text Formatting
Tutorials References Exercises Get Certified
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO [Link] C
REMOVE ADS
PLUS SPACES
GET CERTIFIED FOR TEACHERS
FOR BUSINESS CONTACT US
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
[Link] Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
[Link] Reference
Bootstrap Reference
PHP Reference
[Link] 8/9
10/4/25, 7:22 AM HTML Text Formatting
HTML Colors
Tutorials Java Reference
References
AngularJS Reference
Exercises Get Certified
jQuery Reference
HTML
CSS JAVASCRIPT SQL
Top Examples PYTHON JAVA PHP Get HOW TO
Certified [Link] C
HTML Examples HTML Certificate
CSS Examples CSS Certificate
JavaScript Examples JavaScript Certificate
How To Examples Front End Certificate
SQL Examples SQL Certificate
Python Examples Python Certificate
[Link] Examples PHP Certificate
Bootstrap Examples jQuery Certificate
PHP Examples Java Certificate
Java Examples C++ Certificate
XML Examples C# Certificate
jQuery Examples XML Certificate
FORUM ABOUT ACADEMY
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and
learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full
correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and
privacy policy.
Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by [Link].
[Link] 9/9