HTML Text Formatting
HTML also defines special elements for defining text with a special meaning.
HTML uses elements like <b> and
<i> for formatting output, like bold or italic 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
The HTML <b> element defines bold text, without any extra importance.
Example
<pre>
hello world
hello world
</pre>
HTML <b> and <strong> Elements
The HTML <b>
element defines bold text,
without any extra importance.
Example
<b>This text is bold</b>
The HTML <strong>
element defines strong
text, with added semantic "strong" importance.
Example
<strong>This text is strong</strong>
HTML Text Formatting
we can add comments to our HTML source code by using the following syntax:
<!-- Write your comments here -->
Notice that there is an exclamation point (!) in the opening tag, but not in the closing tag.