HTML Text Formatting
HTML Text Formatting
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
HTML contains several elements for defining text with a special meaning.
Example
superscript
This is subscript and
Try it Yourself »
https://www.w3schools.com/html/html_formatting.asp 1/9
13/07/2025, 18:27 HTML Text Formatting
HTML
<b>
Tutorials and <strong>
Exercises Services Elements
Sign In
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 »
Tip: The <i> tag is often used to indicate a technical term, a phrase from another
language, a thought, a ship name, etc.
Example
<i>This text is italic</i>
Try it Yourself »
https://www.w3schools.com/html/html_formatting.asp 2/9
13/07/2025, 18:27 HTML Text Formatting
The HTML <em> element defines emphasized text. The content inside is typically
Tutorials
displayed in italic.
Exercises Services Sign In
HTML CSS
Tip: A screen JAVASCRIPT
reader SQL the
will pronounce PYTHON
words in JAVA PHP
<em> with HOW TO using
an emphasis, W3.CSS C
verbal stress.
Example
<em>This text is emphasized</em>
Try it Yourself »
Example
Try it Yourself »
Example
<p>Do not forget to buy <mark>milk</mark> today.</p>
Try it Yourself »
https://www.w3schools.com/html/html_formatting.asp 3/9
13/07/2025, 18:27 HTML Text Formatting
HTML
<del>
Tutorials Element
Exercises Services Sign In
Example
<p>My favorite color is <del>blue</del> red.</p>
Try it Yourself »
Example
<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>
Try it Yourself »
Example
<p>This is <sub>subscripted</sub> text.</p>
https://www.w3schools.com/html/html_formatting.asp 4/9
13/07/2025, 18:27 HTML Text Formatting
Try it Yourself »
Tutorials Exercises Services Sign In
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
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?
Submit Answer »
https://www.w3schools.com/html/html_formatting.asp 5/9
13/07/2025, 18:27 HTML Text Formatting
For a complete list of all available HTML tags, visit our HTML Tag Reference.
https://www.w3schools.com/html/html_formatting.asp 6/9
13/07/2025, 18:27 HTML Text Formatting
❮ Previous
Tutorials Exercises Services
Next ❯
Sign In
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
COLOR PICKER
PLUS SPACES
https://www.w3schools.com/html/html_formatting.asp 7/9
13/07/2025, 18:27 HTML Text Formatting
Tutorials Exercises
GET CERTIFIED
Services
FOR TEACHERS
Sign In
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
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
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
https://www.w3schools.com/html/html_formatting.asp 8/9
13/07/2025, 18:27 HTML Text Formatting
W3Schools is optimized for learning and training. Examples might be simplified to improve
https://www.w3schools.com/html/html_formatting.asp 9/9