iPhone 15 Pro
Latest model with advanced features
Storage: 128GB (expandable to 1TB)
Price: $999 $899
Limited time offer - Save $100!
*Terms and conditions apply
HTML text formatting allows you to style and structure text content on web pages using special tags. You'll learn how to make text bold, italic, highlighted, and add semantic meaning that helps both users and search engines understand your content better.
HTML text formatting is the process of applying visual styles and semantic meaning to text content on web pages. It uses special HTML tags to control how text appears and what it represents.
There are two main types of formatting tags:
Physical tags focus only on how text looks without adding meaning.
<b>This text is bold</b>
<i>This text is italic</i>
<u>This text is underlined</u>
Logical tags provide semantic meaning and help screen readers understand content importance.
<strong>This text is important</strong>
<em>This text is emphasized</em>
<mark>This text is highlighted</mark>
<strong>
and <em>
are better for accessibility and SEO because they tell screen readers and search engines that the content is important.
<big>
, <strike>
, <tt>
- they're not supported in HTML5. Use CSS for styling instead.
<p>This is <b>bold text</b> (visual only)</p>
<p>This is <strong>important text</strong> (semantic meaning)</p>
<p>This is <i>italic text</i> (visual only)</p>
<p>This is <em>emphasized text</em> (semantic meaning)</p>
<p>The <mark>highlighted text</mark> stands out.</p>
<p>Search results show <mark>matching keywords</mark> highlighted.</p>
<p>Einstein's formula: E = mc<sup>2</sup></p>
<p>Water molecule: H<sub>2</sub>O</p>
<p>Date: 25<sup>th</sup> December</p>
<p>Price: <del>$100</del> <ins>$80</ins> (20% off!)</p>
<p>Status: <del>Out of stock</del> <ins>Available now</ins></p>
<p>Regular text size</p>
<p><small>Fine print and disclaimers are usually smaller</small></p>
<article>
<h2>iPhone 15 Pro</h2>
<p><strong>Latest model</strong> with <em>advanced features</em></p>
<p>Storage: 128GB <small>(expandable to 1TB)</small></p>
<p>Price: <del>$999</del> <ins><strong>$899</strong></ins></p>
<p><mark>Limited time offer</mark> - Save $100!</p>
<p><small>*Terms and conditions apply</small></p>
</article>
Latest model with advanced features
Storage: 128GB (expandable to 1TB)
Price: $999 $899
Limited time offer - Save $100!
*Terms and conditions apply
<mark>
for highlighting search terms<small>
for disclaimers and fine print<big>
, <strike>
You can combine multiple tags for complex formatting:
<p><strong><em>Very important emphasized text</em></strong></p>
<p>Formula: <strong>H<sub>2</sub>SO<sub>4</sub></strong></p>
<p>Sale: <del><strong>$299</strong></del> <ins><mark>$199</mark></ins></p>
<strong>
and <em>
indicate important content, which can help improve your page rankings.
<strong>
- Important text<em>
- Emphasized text<mark>
- Highlighted text<small>
- Fine print<sup>
- Superscript<sub>
- Subscript<del>
- Deleted text<ins>
- Inserted text<b>
- Bold (no meaning)<i>
- Italic (no meaning)<u>
- Underline (confusing)<big>
- Not supported<strike>
- Use <del><tt>
- Use CSSHTML text formatting is essential for creating professional web pages. Remember these key points: