Show Menu

HTML4 Cheat Sheet by DaveChild

HTML4 cheat sheet

HTML4 Document Outline

<!D­OCT­YPE>Version of (X)HTML
<ht­ml>HTML document
<he­ad>Page inform­ation
<bo­dy>Page contents

HTML4 Comments

<!-- Comment Text -->

HTML4 Page Inform­ation

<ba­se>Base URL
<me­ta>Meta data
<li­nk>Relevant resource
<st­yle>Style resource
<sc­rip­t>Script resource

HTML4 Document Structure

<h1> to <h6>Headings
<di­v>Page section
<sp­an>Inline section
<br>Line break
<hr>Horizontal rule

HTML4 Links

<a href="">Page link
<a href="m­ail­to:­">Email link
<a name="n­ame­">Anchor
<a href="#­nam­e">Link to anchor

HTML4 Text

<st­ron­g>Strong emphasis
<bl­ock­quo­te>Long quotation
<q>Short quotation
<pr­e>Pre-fo­rmatted text
<de­l>Deleted text
<in­s>Inserted text
<bd­o>Text direction

HTML4 Lists

<ol>Ordered list
<ul>Unordered list
<li>List item
<dl>Definition list
<dt>Definition term
<dd>Term descri­ption

HTML4 Forms

<fi­eld­set>Collection of fields
<le­gen­d>Form legend
<la­bel>Input label
<in­put>Form input
<se­lec­t>Drop-down box
<op­tgr­oup>Group of options
<op­tio­n>Drop-down options
<te­xta­rea>Large text input

HTML4 Tables

<th­ead>Table header
<tb­ody>Table body
<tf­oot>Table footer
<co­lgr­oup>Column group
<tr>Table row
<th>Header cell
<td>Table cell

HTML4 Images

<ma­p>Image Map
<ar­ea>Area of Image Map

HTML4 Objects


HTML4 Core Attributes


Core Attributes may not be used with base, head, html, meta, param, script, style or title elements.

HTML4 Language Attributes


Language Attributes may not be used in base, br, frame, frameset, hr, iframe, param or script elements.

HTML4 Keyboard Attributes


HTML4 Events

Window Events
Form Events
Keyboard Events
Mouse Events

Share This Cheat Sheet!

Favourited by 36 Members:

scitrenb twbcs clazito ThibaultGomarin GarthZares Roderic mrlaziz gmickd Swahilikid Dranzz webdevo and 26 more ...


Scott Scott, 10:02 28 Nov 11

Sorry to be a pedant, but this cheat-sheet is misleading.

HTML4 doesn't technically allow self closing tags ( <br /> <hr /> etc), whereas XHTML does.

Scott Scott, 10:02 28 Nov 11

Accidentally posted before finishing:

From w3c >>
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

DaveChild DaveChild, 10:02 28 Nov 11

Quite right, Scott, and thanks for pointing that out. I've fixed the issue.

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.