0% found this document useful (0 votes)
242 views

HTML Text Formatting

This document discusses various HTML elements for formatting text, including elements to define bold, italic, emphasized, important, subscript, superscript, smaller, deleted, inserted, and marked up text. It provides examples of each element and a brief description of its purpose. Formatting elements allow displaying special types of text in the browser.

Uploaded by

minal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
242 views

HTML Text Formatting

This document discusses various HTML elements for formatting text, including elements to define bold, italic, emphasized, important, subscript, superscript, smaller, deleted, inserted, and marked up text. It provides examples of each element and a brief description of its purpose. Formatting elements allow displaying special types of text in the browser.

Uploaded by

minal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML Text Formatting

❮ PreviousNext ❯

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
 <del> - Deleted text
 <ins> - Inserted text
 <sub> - Subscript text
 <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 »

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 »

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

You might also like