You are on page 1of 2

HTML Codes - Text Formatting Tags

The text formatting samples below shows you all the HTML text formatting elements in one handy place. Each of these elements can be stylized using CSS. The examples shown below represent the default display by whatever browser you're using. Note that the default display for some elements can be different from one browser brand to another, or from version to version. You may wish to use CSS to set the display style so it's consistent across all user agents.

HTML Phrase Elements


Element Code <em>...</em> <strong>...</strong> <dfn>...</dfn> <code>...</code> <samp>...</samp> <kbd>...</kbd> <var>...</var> <cite>...</cite> <abbr>...</abbr> <acronym>...</acronym> Display Sample Emphasized Text Strong Text Definition Text
Code Text

Sample Text
Keyboard Text

Variable Text Citation Text Abbreviation Text Acronym Text

Font Style Elements


Element Code <tt>...</tt> <i>...</i> <b>...</b> <big>...</big> <small>...</small> <strike>...</strike> <s>...</s> <u>...</u> Display Sample
Teletype Text

Italic Text Bold Text

Big Text
Small Text

Deprecated - Use CSS Deprecated - Use CSS Deprecated - Use CSS

Heading Elements
Element Code <h1>...</h1> <h2>...</h2> <h3>...</h3> <h4>...</h4> <h5>...</h5> <h6>...</h6> Display Sample

Quote and Blockquote Elements


Quote Element The <q> element is for use when quoting short passages of text. All it does in most browsers is insert quotation marks at the beginning and end of the quoted passage. Blockquote Element The <blockquote> element is for use when quoting a large block of text. In most browsers it just created a margin on the left and right sides of the blockquote text. Using CSS you can pretty it up as you like.

You might also like