HTML Text Formatting

HTML Text Formattting

The HTML Text Formatting is used to enhance the presentation of your webpage.

HTML <b> Element

The HTML <b> Element is used to make the text to appear bold, without any extra importance.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>I'm very <b>bold</b>.</p> </body> </html>

HTML <strong> Element

The HTML <strong> Element is used to make the text to appear bold, with extra importance.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Michael Phelps won 6 <strong>gold</strong> medals.</p> </body> </html>

HTML <i> Element

The HTML <i> Element is used to offset the text from the normal prose. It is typically displayed in italic type.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>i tag stands for <i>italic</i></p> </body> </html>

HTML <u> Element

The HTML <u> Element is used to underline the text within it.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>u tag stands for <u>underline</u></p> </body> </html>

HTML <mark> Element

The HTML <mark> Element is used to mark or highlight the relevant text in the content.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Capital of England is <mark>London</mark>.</p> <p><mark>London</mark> is one of the biggest cities in the world.</p> </body> </html>

HTML <del> Element

The HTML <del> Element is used to specifies a range of text that has been deleted from a document.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>I like <del>coffee</del> tea.</p> </body> </html>

HTML <ins> Element

The HTML <ins> Element is used to specifies a range of text that has been added to a document.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>I Like <del>red</del> <ins>blue</ins></p> </body> </html>

HTML <hr> Element

The HTML <hr> Element is used to add a thematic break between paragraph-level elements.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Answer for question 1.</p> <hr> <p>Answer for question 2.</p> </body> </html>

HTML <br> Element

The HTML <br> Element is used to insert a line break in text.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>This paragraph is <br> broken</p> </body> </html>

HTML <small> Element

The HTML <small> Element is used to make the text smaller in size.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Great gift comes from <small>small</small> packages</p> </body> </html>

HTML <em> Element

The HTML <em> Element is used to render the text as emphasized text.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Normal Text.</p> <em>Emphasized Text.</em> </body> </html>

HTML <sub> Element

The HTML <sub> Element defines subscript text. For example, CO2, H2O, etc.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>This is <sub>subscript</sub></p> <p>H<sub>2</sub>O = Water.</p> </body> </html>

HTML <sup> Element

The HTML <sup> Element defines superscript text. For example, 52, 3rd, etc.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>This is <sup>superscript</sup></p> <p>2<sup>2</sup> = 4.</p> </body> </html>

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author