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> – Small text
<del> – Deleted text
<ins> – Inserted text
<sub> – Subscript text
<sup> – Superscript text
</br> – line break
By enclosing words in the tags <b> and </b> we can make characters appear bold.
<p>This is how we make a word appear <b>bold.</b> </p>
The use of the <strong> element indicates that its content has strong importance.
For example, the words contained in this element might be said with strong emphasis. By default, browsers will show the contents of a <strong> element in bold.
By enclosing words in the tags <i> and </i> we can make characters appear italic.
The <em> element indicates emphasis that subtly changes the meaning of a sentence.
By default browsers will show the contents of an <em> element in italic.
The HTML <mark> element defines marked/highlighted text.
The HTML <small> element defines smaller text.
The HTML <del> element defines deleted/removed text. It is shown with a line on the word that is deleted.
The HTML <ins> element defines inserted/added text. It is usually shown with an underline on the text that is inserted.
The <sub> element is used to contain characters that should be subscript. It is commonly used with footnotes or chemical formulas such as H20.
The <sup> element is used to contain characters that should be superscript such as the suffixes of dates or mathematical concepts like raising a number to a power such as 2².
The </br> element is used to break a line and start from the next line.