Show Menu
Cheatography

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
<ti­tle>
Title
<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
<p>
Paragraph
<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
<em>
Emphasis
<bl­ock­quo­te>
Long quotation
<q>
Short quotation
<ab­br>
Abbrev­iation
<ac­ron­ym>
Acronym
<ad­dre­ss>
Address
<pr­e>
Pre-fo­rmatted text
<df­n>
Definition
<co­de>
Code
<ci­te>
Citation
<de­l>
Deleted text
<in­s>
Inserted text
<su­b>
Subscript
<su­p>
Supers­cript
<bd­o>
Text direction
 

HTML4 Lists

Ordered list
Unordered list
List item
Definition list
Definition term
Term descri­ption

HTML4 Forms

<fo­rm>
Form
<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
<bu­tto­n>
Button

HTML4 Tables

<ta­ble>
Table
<ca­pti­on>
Caption
<th­ead>
Table header
<tb­ody>
Table body
<tf­oot>
Table footer
<co­lgr­oup>
Column group
<co­l>
Column
<tr>
Table row
<th>
Header cell
<td>
Table cell

HTML4 Images

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

HTML4 Objects

<ob­jec­t>
Object
<pa­ram>
Parameter

HTML4 Core Attributes

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

HTML4 Language Attributes

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

HTML4 Keyboard Attributes

accesskey
tabindex

HTML4 Events

Window Events
onload
onunload
Form Events
onblur
onreset
onchange
onselect
onfocus
onsubmit
Keyboard Events
onkeydown
onkeyup
onkeypress
Mouse Events
onclick
onmouseout
ondblclick
onmous­eover
onmous­edown
onmouseup
onmous­emove
                       
 

Comments

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

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.

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.

Esta información me ha serviso de mucho y es de mucho interés la seguiré visitando con frecuencia, gracias

Exeléntes trucos, hay mas de los que me imaginaba ya guarde la pagina me es de mucha utilidad, gracias

Thank u so much Dave, this cheatsheet is so helpful!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          CSS2 Cheat Sheet

          More Cheat Sheets by DaveChild

          Regular Expressions Cheat Sheet
          Linux Command Line Cheat Sheet
          CSS2 Cheat Sheet