Common HTML Markup

Oct 04, 2008
by:   Tim Stanley

Everyone that writes content on the web should know a little HTML.  This is my cheat sheet for the most common used HTML elements I've seen that are supported in multiple browsers, tools, and CMS software.

Text Structure

blockquote, br, h1, h2, h3, h4, h5, h6, p


A pessimist is one who makes difficulties of his opportunities and an optimist is one who makes opportunities of his difficulties.

Harry S. Truman

<blockquote cite="">
    <p>A pessimist is one who makes difficulties of his opportunities 
    and an optimist is one who makes opportunities of his difficulties.</p>
    <p>Harry S. Truman</p>

HTML Elements

a, abbr, acronym, code, del, em, ins, img, pre, sub, sup, strike, strong


  • The image element (img) should include an alt="" attribute that is a description of the image.
  • Declining in use; b (use strong),  i (use em).
  • The element strike could be used for formatting, but if used to denote editing, del should be used instead.


HTML or HTML 4.01 is an abbreviation, whereas, GUI is an acronym. I added text then removed it.

    <abbr title="Hyper Text Markup Language">HTML</abbr> or <a title="HTML 4.01 Specification" 
    href="">HTML 4.01</a> is an abbreviation, 
    whereas, <acronym title="Graphical User Interface">GUI</title> is an acronym. 
    I <ins>added</ins> text then <del>removed</del> it. </acronym>


dldt, dd, li, ol, ul


  • apples
  • peaches
  • pears



caption, tabletdthtr

Grouping: tbody, thead, tfoot


Column One Column Two
cell one cell two
cell three cell four
Table caption

      <th>Column One</th>
      <th>Column Two</th>
      <td>cell one</td>
      <td>cell two</td>
      <td>cell three</td>
      <td>cell four</td>
<caption>Table caption</caption>

Content Formatting

br, div, hr, span

Elements To Avoid

center, font, s, u

Style Preferences

br, div, hr, span, img

Personally, I don't like br tags.  If more space is needed between paragraphs, then the CSS should be modified, not the content. I prefer div elements for block sections and span elements for inline.


Snowmobiles at Keystone Colorado

I went on a snowmobile tour in Keystone Colorado.

<div class="floatleft">
    <img alt="Snowmobiles at Keystone Colorado"  
<p>I went on a snowmobile tour in Keystone Colorado.</p>
<div class="clearer></div>

Head Elements

link, meta, script, style, title


The meta description is used to display by search engines.  If a description isn't present, the search engine will pick their won.  Most search engines use a combination of the description and content to display preview information of the page.

Version information on style sheets and JavaScript files are used and updated when the content changes to force browsers to re-load their cached versions (particularly if a far expiration date is set on the content).


<head profile="">
    <link rel="stylesheet" href="/themes/style.css&amp;v=" type="text/css" />
    <meta name="keywords" content="photography,photoshop" />
<meta name="description" content="Mister Retro has a great set of Photoshop plug-in's that
    will save a significant amount of time and effort when manipulating files in Photoshop for 
    those textured and stunning artistic effects." />
    <link rel="last" title="Using Cache And Compression For Performance" 
        href="/post/Using-Cache-And-Compression-For-Performance.aspx" />
    <link rel="first" title="How To Enable HTM Server Side Include Parsing in IIS" 
        href="/post/How-To-Enable-HTM-Server-Side-Include-Parsing-in-IIS.aspx" />
    <link rel="next" title="Images Part 1 - Snagit" href="/post/Images-Part-1-Snagit.aspx" />
    <link rel="prev" title="Font Tools" href="/post/Font-Tools.aspx" />
    <link rel="contents" title="Archive" href="/archive.aspx" />
    <link rel="start" title="" href="/" />
    <link type="application/rdf+xml" rel="meta" title="SIOC" href="" />
    <link type="application/apml+xml" rel="meta" title="APML" href="" />
    <link type="application/rdf+xml" rel="meta" title="FOAF" href="" />
    <link type="application/rss+xml" rel="alternate" title=" (RSS)" 
        href="" />
    <link type="application/atom+xml" rel="alternate" title=" (ATOM)"
        href="" />
    <link type="application/rsd+xml" rel="edituri" title="RSD" href="" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link type="application/opensearchdescription+xml" rel="search" title=""
        href="" />
    <script type="text/javascript" src="/blog.js&amp;v="></script>
    <title>Machine Wash Effect - </title>


The DOCTYPE is the most controversial.  XHTML or HTML, transitional, or strict?  The main reason the DOCTYPE is controversial is because it can cause browsers to display in standard or quirks mode depending on the DOCTYPE. XHTML 1.0 Transitional is my preference.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 


Related Items