Slide 2.10: HTML paragraphs
Slide 2.12: HTML styles
Home

HTML Text Formatting


HTML uses tags like <b> and <i> for formatting output, like bold or italic text. These HTML tags are called formatting tags.

Text Formatting Tags

Tag Description
<b> Defines bold text.
<big> Defines big text.
<em> Defines emphasized text.
<i> Defines italic text.
<small> Defines small text.
<strong> Defines strong text.
<sub> Defines subscripted text.
<sup> Defines superscripted text.
<ins> Defines inserted text.
<del> Defines deleted text.
<s> Deprecated. Use <del> instead.
<strike> Deprecated. Use <del> instead.
<u> Deprecated. Use styles instead.
  “Computer Output” Tags

Tag Description
<code> Defines computer code text.
<kbd> Defines keyboard text.
<samp> Defines sample computer code.
<tt> Defines teletype text.
<var> Defines a variable.
<pre> Defines preformatted text.
<listing> Deprecated. Use <pre> instead.
<plaintext> Deprecated. Use <pre> instead.
<xmp> Deprecated. Use <pre> instead.

Citations, Quotations, and Definition Tags

Tag Description Tag Description
<abbr> Defines an abbreviation. <acronym> Defines an acronym.
<address> Defines an address element. <bdo> Defines the text direction.
<blockquote> Defines a long quotation. <q> Defines a short quotation.
<cite> Defines a citation. <dfn> Defines a definition term.

Demonstration
The following demonstration shows how the HTML script is displayed on the Web.