HTML Text Formatting

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 (see the full tag reference at the bottom).

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

<b> and <i> define bold or italic text.

<strong> or <em> means the text you’re presenting is important, so highlight it. All major browsers today can render fonts with various effects. However, browsers may support better rendering in the future.

HTML text formatting tags

Labeldescribe
<b>define bold text
<em>Define emphasis text
<i>define italics
<small>define small characters
<strong>define accent
<sub>define subscript
<sup>define superscript
<ins>define caret
<del>define delete word

HTML “Computer Output” tag

Labeldescribe
<code>define computer code
<kbd>define keycode
<samp>Define Computer Code Samples
<var>define variable
<pre>define preformatted text

HTML Citations, Quotes, and Tag Definitions

Labledescribe
<abbr>define abbreviations
<address>define address
<bdo>define text direction
<blockquote>define long references
<q>define short quotes
<cite>define citation, citation
<dfn>Define a definition item.