Tutorials Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C 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
superscript
This is subscript and
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
<del> - Deleted text
<ins> - Inserted text
<sub> - Subscript text
Tutorials Exercises
<sup> - Superscript text
Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
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 »
ADVERTISEMENT
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.
Tutorials
Example Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C 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:
Example
<p>Do Tutorials
not forget to buy <mark>milk</mark> today.</p>
Exercises Services Sign Up Log in
HTML
Try itCSS
YourselfJAVASCRIPT
» SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
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
The HTML <sub> element defines subscript text. Subscript text appears half a character below
the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for
chemical formulas, like H2O:
Tutorials
Example Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
<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>
Submit Answer »
HTML
Text
Tutorials Formatting
Exercises ServicesElements
Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
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
Tutorials Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
❮ Previous Next ❯
Track your progress - it's free! Sign Up Log in
ADVERTISEMENT
Tutorials Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
COLOR PICKER
ADVERTISEMENT
Tutorials Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
ADVERTISEMENT
Tutorials Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
ADVERTISEMENT
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
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
Tutorials CSS Reference
Exercises
JavaScript Reference
Services Sign Up Log in
SQL Reference
HTML
CSS Python Reference
JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
Top Examples Get Certified
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
W3.CSS 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 W3.CSS.