HTML text formatting - HTML Tutorial

HTML text formatting

There are some formatted text tags in HTML that can be used directly without you having to write styles and adjust them.

HTML text formatting tags

  • Bold text   
  • Italic text
  • This is subscript and superscript

HTML text formatting - HTML Tutorial

The above code output is given below:

HTML text formatting - HTML Tutorial

HTML formatting tags

HTML uses tags <b> ("bold") and <i> ("italic") to format the output text, such as bold  or  italic
These HTML tags are called formatting tags.

Usually the tag <strong> is used instead of the bold tag <b>, and <em> is used instead of the <i> tag.

However, these tags have different meanings:
<b> and <i> define bold or italic text.

<strong> or <em> means that the text you want to render is important, so highlight it.

All major browsers today can render fonts with various effects. However, browsers may support better rendering in the future.

Tag Description
<b> Define bold text
<em> Define focus on text
<i> Define italics
<small> Define trumpet
<strong> Definition accentuated
<sub> Define subscript
<sup> Define superscript
<ins> Define create
<del> Define delete word

HTML Basic Tags
HTML Editors
HTML Introduction
HTML Attributes
HTML Titles
HTML Paragraphs