I wrote this document to serve as a reminder for myself. This document isn't meant as a tutorial, though if you're familiar with markup languages then this may do fine. If you're just starting to learn about HTML, there are certainly better primers out there (htmlprimer.com looks ok, for example).
There are several different versions of HTML available. This document is written using HTML 3.2 which is now quite old (finalized in 1997); on the bright side, all browsers should have full support for HTML 3.2 by now. HTML 4.01 is the most current (as of 2009/04/14); the major changes from HTML 3.2 are specifications on handling multimedia, cascading style sheets, and scripting. But the web has begun moving to XHTML which reconstructs HTML as a form of XML.
All HTML 3.2 documents must begin with the following line:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- is a comment -->
<BR> forces a line break.
<P> begins a new paragraph; you can end it with
</P>.
<HR> produces a horizontal rule the width of
the browser window.
To include inline images, use the <IMG> tag, as in
<IMG SRC="blah.gif" ALIGN=BOTTOM>;
the alignment is (by default) to
the bottom. You can also specify MIDDLE and TOP.
You can also give
an ALT option for text to be displayed instead of
the image (in case
the browser can't retrieve/display the images). Extended HTML
supports RIGHT, LEFT, and CENTER
alignment options too.
You can now change the font with a <FONT></FONT>
pair; they take SIZE and COLOR attributes.
<STRONG></STRONG> produces text with strong emphasis.<CITE></CITE> produces text for citations.<DFN></DFN> produces text for definitions.<CODE></CODE> produces text that looks like computer code.<STRIKE></STRIKE> produces <BIG></BIG> produces large text.<SMALL></SMALL> produces small text.<SUP></SUP> produces superscripted text.<SUB></SUB> produces subscripted text.<VAR></VAR> produces text for variable names.<KBD></KBD> produces text that the user should
enter<PRE></PRE> produces text that is preformatted
<BLOCKQUOTE></BLOCKQUOTE> produces text like this
You should use the above codes in favour of these explicit codes:
<I></I> produces text like this.
<TT></TT> produces text like this.
<B></B> produces test like this.
<EM></EM> produces text like this.
There are several kinds of lists:
<UL>
<LI> element
</UL>
<MENU>
<LI> element
</MENU>
<DIR>
<LI> element
</DIR>
<OL>
<LI> element
</OL>
COMPACT attribute.
<DL>
<DT>Term
<DD>Definition
</DL>
| HTML Tag | Description | Actual character |
| < | less-than | < |
| > | greater-than | > |
| & | ampersand | & |
| " | quotation mark | " |
| | non-breaking space | " " |
|   | en-space | " " |
|   | em-space | " " |
| – | en-dash | "–" |
| — | em-dash | "—" |
| ­ | soft hyphen | "" |
| ¶ | para | ¶ |
| § | section marker | &sets; |
| · | middle dot | · |
| © | copyright | © |
| ® | registered trademark | ® |
| § | section marker | &sets; |
| § | section marker | &sets; |
Note that
,
 ,
 ,
–,
and — are not supported by X/Mosaic, and many
other browsers.
Some other special symbols, taken from Netscape, are:
| HTML Tag | Description | Actual character |
| © | copyright | © |
| ¡ | inverse exclamation | ¡ |
| ¿ | inverted question | ¿ |
| ¢ | cent sign | ¢ |
| £ | pound sterling | £ |
| ¤ | generic currency | ¤ |
| ¦ | pipe | ¦ |
| § | section | § |
| ª | (?) | ª |
| º | (?) | º |
| « | left angled quotations | « |
| » | right angled quotations | » |
| ± | plus-minus | ± |
| ¹ | superscript 1 | ¹ |
| ² | superscript 2 | ² |
| ³ | superscript 3 | ³ |
| ´ | acute | ´ |
| ¯ | macro | ¯ |
| µ | micro | µ |
| ¶ | paragraph marker | ¶ |
| · | middle-dot | · |
| ¼ | 1/4 fraction | ¼ |
| ½ | 1/2 fraction | ½ |
| ¾ | 3/4 fraction | ¾ |
| × | times operator | × |
| ÷ | division operator | ÷ |
| þ | thorn | þ |
| Þ | capital thorn | Þ |
The HTML 3.2 Specification has a section with other entities.
Use <A NAME="anchorname">anchor</A>
to create an anchor to some text, and
use <A HREF="document#anchorname>link</A>
to go to it.
You should have a <HEAD></HEAD> and
<BODY></BODY> section in your
HTML document. Some servers (may) allow viewing only the headers
of documents. <ADDRESS></ADDRESS> usually
gives information on how to contact the author of the page.
You can create tables. (This is a new addition, and hasn't been
well-researched)
The table is started with a
<TABLE ALIGN="CENTER" BORDER="1">.
You can add a <CAPTION></CAPTION> pair too (which has
an ALIGN attribute for placement relative to the table).
Rows are defined with a <TR></TR> pair.
Headers within a row are defined with a <TH></TH> pair.
Cells within a row are defined with <TD></TD> pairs.
The table is ended with a </TABLE> tag.
You may find these pages helpful too: