0% found this document useful (0 votes)
0 views9 pages

HTML Text Formatting

Uploaded by

Sentinel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views9 pages

HTML Text Formatting

Uploaded by

Sentinel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

13/07/2025, 18:27 HTML Text Formatting

 Tutorials  Exercises  Services   Sign In

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS 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
<sup> - Superscript text

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

HTML CSS <b> JAVASCRIPT


The HTML SQL
element defines PYTHON
bold text, withoutJAVA PHP
any extra HOW TO
importance. W3.CSS C

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 »

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.

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 »

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 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

HTML CSS <del>


The HTML JAVASCRIPT SQL textPYTHON
element defines JAVAdeleted
that has been PHPfrom HOW TO W3.CSS
a document. C

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:

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

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 Formatting Elements

https://www.w3schools.com/html/html_formatting.asp 5/9
13/07/2025, 18:27 HTML Text Formatting

Tag Tutorials  Description


Exercises  Services   Sign In

<b> Defines bold text


HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
<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

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

Track your progress - it's free! Sign Up Log in

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

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
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
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

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

 Tutorials  Exercises  reading and learning.


Services  
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot
Sign In
warrant full correctness
HTML
 of
CSS all content. While
JAVASCRIPT using W3Schools,
SQL you agree to have
PYTHON JAVAread and
PHPaccepted
HOW our TO
terms ofW3.CSS C
use, cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by


W3.CSS.

https://www.w3schools.com/html/html_formatting.asp 9/9

You might also like