Download - HTML 4.01 Specifications
Information TechnologyRice University
HTML 4.01 Specification MarkUp Tag List
Document ALL 14August 1, 2001
This document lists the most widely implemented tags currently accepted by the HTML 4.01 specifi-cation, as well as common Cascading Style Sheet (CSS) properties and many deprecated tags still in common use. This is purely a reference and is not designed for newcomers to HTML or the Web.
Rice University, 2001 All Rights Reserved
Document may not be resold to, used by, nor licensed to third parties without written permission from User Services, Rice University.
Table of Contents
If you have any comments or suggestions about this document, send them to [email protected] via electronic mail.
Table of Contents
Background on HTML..............................................................................................3Symbols Used ....................................................................................................3
General ......................................................................................................................3
Structural Definition..................................................................................................4
Presentation Formatting ............................................................................................4
Links and Graphics ...................................................................................................5
Dividers .....................................................................................................................6
Lists ...........................................................................................................................6
Backgrounds and Colors ...........................................................................................6
Forms ........................................................................................................................7
Tables ........................................................................................................................8
Frames.......................................................................................................................9
Miscellaneous............................................................................................................9
Cascading Style Sheets .............................................................................................9Length Values ..................................................................................................10Font Properties .................................................................................................10Color and Background Properties....................................................................10Text Properties .................................................................................................11List Properties ..................................................................................................11
ISO Latin Codes - Special Characters.....................................................................11
HexaDecimal Color Triplets ...................................................................................13
2 HTML 4.01 Specification MarkUp Tag List
Background on HTML
Background on HTML
The World Wide Web Consortium (W3C), the self-appointed official policy-makers attempting to define standards for all documents on the web, released the HTML 4.01 in December 1999 to fix some bugs in the 4.0 specification. It is essential to understand that, at this point, no one really has the power to standardize the web. Powerful corporations such as Netscape and Microsoft have at least as much say in what will be recognized because it is their browsers that interpret the code. The W3C makes a valiant effort at encompassing the most widely-recognized HTML tags into their specification. But this is an uphill effort, to say the least. The web is constantly evolving and browsers vary greatly. It is always a good policy to check the appearance of your page in several different browsers.
The following list is a collection of the most widely implemented and up-to-date tags. Where noted cer-tain tags apply only to a given version (or higher) of a browser. This document considers only Internet Explorer versions 3 and above, and Netscape versions 4 and above, as these are a minimum standard for the vast majority of internet users. If you wish to check the compatibility of HTML features you are using with other browsers, or older browser versions, consult a page with a compatibility chart such as the one at blooberry.com:
http://www.blooberry.com/indexdot/html/supportkey/a.htm
Symbols Used
General
All HTML Documents Should Have These
The following list of tags in grouped by function. There are several tags listed as being deprecated in HTML 4.01. This means that they are no longer part of the standard, and while they will still work, the preferred method for getting the same effect is to use style sheets.
URL URL of an external file including “http://” (or a relative link)
? Arbitrary number (i.e. <H?> means <H1>, <H2>, etc.)
% Arbitrary percentage (i.e. <HR WIDTH= “%”> means <HR WIDTH= “50%”>, etc.)
*** Arbitrary text (i.e. ALT= “***” means fill in with appropriate text)
rrggbb Arbitrary hex color (i.e. BGCOLOR= “#rrggbb” means BGCOLOR= “#00FF33”, etc.)
| Logical OR, a choice between several options separated by |
, , , Several numbers separated by commas
NN4 Netscape Navigator 4.x
IE3 Internet Explorer 3
Document Type <HTML> </HTML> beginning and end of file
Header <HEAD> </HEAD> descriptive, info, such as title
Title <TITLE> </TITLE> must be in header
Body <BODY> </BODY> bulk of the page
HTML 4.01 Specification MarkUp Tag List 3
Structural Definition
Structural Definition
Appearance Controlled by the Browser’s Preferences
Presentation Formatting
Author Specifies Text Appearance
Description Tag Notes
Heading <H?> </H?> The specification defines levels 1-6
Heading Align-ment
<H? ALIGN=LEFT | RIGHT | CENTER> </H?>
Division <DIV STYLE= “***”> </DIV> creates a logical division, often used in combination with in-line style defini-tions, defined by the STYLE attribute
Division Align-ment
<DIV ALIGN=LEFT | RIGHT | CENTER> </DIV>
Emphasis <EM> </EM> Usually displayed as italics
Strong Emphasis <STRONG> </STRONG> Usually displayed as bold
Citation <CITE> </CITE> Usually displayed as italics
Blockquote <BLOCKQUOTE> </BLOCKQUOTE>
Usually indented on both sides, defines a long quote
Code <CODE> </CODE> for source code; usually used a fixed-width font (such as Courier)
Sample Output <SAMP> </SAMP> Usually uses fixed-width font
Keyboard Input <KBD> </KBD> Usually uses fixed-width font
Variable <VAR> </VAR> Usually uses italics
Definition <DFN> </DFN> Not supported in NN4 and below
Author’s Address <ADDRESS> </ADDRESS> Usually uses italics and is indented
Large Font Size <BIG> </BIG>
Small Font Size <SMALL> </SMALL>
Acronym <ACRONYM TITLE= “***”> </ACRONYM>
Title field specifies long version of acro-nym; not supported in NN4, IE3 or below; title text displays on mouse-over
Description Tag Notes
Bold <B> </B>
Italics <I> </I>
Underline <U> </U> use carefully - makes text look like links
Strikeout <S> </S> or <STRIKE> </STRIKE> deprecated in HTML 4.01 - use style sheets instead
4 HTML 4.01 Specification MarkUp Tag List
Links and Graphics
Links and Graphics
Subscript <SUB> </SUB>
Superscript <SUP> </SUP>
Typewriter <TT> </TT> monospaced font (Courier)
Preformatted <PRE> </PRE> respects spaces, monospaced font
Center <CENTER> </CENTER> deprecated in HTML 4.01 - use style sheets or: <DIV ALIGN=CENTER>
Font Size <FONT SIZE=?> </FONT> from 1-7, default is 3; deprecated in HTML 4.01 - use style sheets
Font Color <FONT COLOR=“#rrggbb”></FONT> deprecated in HTML 4.01 - use style sheets
Select Font <FONT FACE=“***”> </FONT> deprecated in HTML 4.01 - use style sheets; won’t work if font specified isn’t installed on the viewer’s computer
Description Tag Notes
Anchor <A NAME=“***”> </A> creates an invisible anchor in the docu-ment that can be linked to
Link <A HREF=“URL”> </A>
Link to Anchor <A HREF=“#***”> </A><A HREF=“URL#***”> </A>
same pageanother document
Link to Email <A HREF=“mailto:***@***”> </A>
Target Window <A HREF=“URL”TARGET=“***”> </A>
specifies the window or frame to open the link in; standard values are:_blank - opens a new window_parent - open in the window that opened this one_self - (default) open in this window_top - break out of frame and fill window
Display Image <IMG SRC=“URL”> no closing tag
Alternate Text <IMG SRC=“URL” ALT= “***”> text displayed if image can’t be displayed
Image Alignment <IMG SRC=“URL” ALIGN= TOP | BOTTOM | MIDDLE | LEFT | RIGHT>
deprecated in HTML 4.01 - use style sheets instead
Image Dimensions <IMG SRC=“URL” WIDTH= ? | % HEIGHT= ? | %>
in pixels or percent of page
Image Border <IMG SRC=“URL” BORDER=?> in pixels; deprecated in HTML 4.01 - use style sheets
Runaround Space <IMG SRC=“URL” HSPACE=? VSPACE=?>
in pixels; deprecated in HTML 4.01 - use style sheets
Description Tag Notes
HTML 4.01 Specification MarkUp Tag List 5
Dividers
Dividers
Lists
Backgrounds and Colors
Description Tag Notes
Paragraph <P> </P> closing tag often unnecessary
Line Break <BR> no closing tag
Horizontal Rule <HR> no closing tag
HR Thickness <HR SIZE=?> in pixels
HR Width <HR WIDTH= ? | %> in pixels or percent of page
Description Tag Notes
Unordered List <UL> <LI> </UL> <LI> before each item
Bullet Type <UL TYPE=DISC | CIRCLE | SQUARE> </UL>
for the whole listdeprecated in HTML 4.01, use style sheet
Bullet Type <LI TYPE=DISC | CIRCLE | SQUARE>
this and subsequentdeprecated in HTML 4.01, use style sheet
Ordered List <OL> <LI> </OL> <LI> before each item
Numbering Type <OL TYPE= A | a | I | i | 1> </OL> for the whole listdeprecated in HTML 4.01, use style sheet
Numbering Type <LI TYPE= A | a | I | i | 1> this and subsequentdeprecated in HTML 4.01, use style sheet
Starting Number <OL START=?> for the whole list
Starting Number <LI VALUE=?> this and subsequent
Description Tag Notes
Tiled Background <BODY BACKGROUND=“URL”>
Background Color <BODY BGCOLOR=“#rrggbb”>
Text Color <BODY TEXT=“#rrggbb”>
Link Color <BODY LINK=“#rrggbb”> unvisited links
Visited Link <BODY VLINK=“#rrggbb”>
Active Link <BODY ALINK=“#rrggbb”>
6 HTML 4.01 Specification MarkUp Tag List
Forms
Forms
Generally requires a script on the server. Rice supports a specific script, and you can use ones on out-side sites. For more information about forms on Rice webpages consult document ALL 13.
Description Tag Notes
Define Form <FORM ACTION=“URL”METHOD=GET | POST> </FORM>
Action specifies the url of the script used to process input; the method will be specified by the script you use
Input Field <INPUT TYPE=TEXT | PASSWORD | CHECKBOX | RADIO | FILE | IMAGE | HIDDEN | SUBMIT | RESET>
no closing tag needed
Field Name <INPUT TYPE=*** NAME=“***”>
Field Value <INPUT TYPE=*** VALUE=“***”> • initial value in a field for text, pass-word, hidden inputs
• value submitted if selected for radio buttons and checkboxes
• text on the Submit and Reset but-tons
Checked? <INPUT TYPE=CHECKBOX | RADIO CHECKED>
defaults checkboxes and radio buttons as selected
Field Size <INPUT TYPE=TEXT | FILE | PASS-WORD SIZE=?>
in characters
Max Length <INPUT TYPE=TEXT | FILE | PASS-WORD MAXLENGTH=?>
in characters
Selection List <SELECT> </SELECT> drop-down menu that contains several options
Num of Options Visible
<SELECT SIZE=?> </SELECT> number of rows in selection box displayed at one time
Select Multiple <SELECT MULTIPLE> </SELECT> can select multiple options at one time
Option <OPTION VALUE=“***”>displayed text</OPTION>
value contains what will be submitted, text between open and close tags is displayed to user
Default Select? <OPTION SELECTED> this option is selected by default
Multi-Line Text Box
<TEXTAREA NAME=“***”>default text contents</TEXTAREA>
Size of Text Box
<TEXTAREA NAME=“***” ROWS=? COLS=?> </TEXTAREA>
columns in number of characters
Text Wrap <TEXTAREA WRAP=“OFF | SOFT | HARD”> </TEXTAREA>
• off -no text wrap• soft - on-screen wrap, not sent in
submitted data• hard - visible text wrap sent with
form
HTML 4.01 Specification MarkUp Tag List 7
Tables
Tables
If you plan to use tables for extensive or detailed layout using an HTML editor such as Dream-weaver will be more efficient than hand-design.
Description Tag Notes
Define Table <TABLE> </TABLE>
Border <TABLE BORDER=?> </TABLE> in pixels; a 0 border is invisible
Cell Spacing <TABLE CELLSPACING=?> in pixels; space between cells
Cell Padding <TABLE CELLPADDING=?> in pixels; space between cell border and contents
Desired Width <TABLE WIDTH= ? | %> in pixels or percent of page
Background Color <TABLE BGCOLOR=“#rrggbb”>
Outer Border <TABLE FRAME= VOID | ABOVE | BELOW | HSIDES | VSIDES | LHS | RHS | BOX>
Background Image <TABLE BACKGROUND=“URL”> Very uneven implementation -- view on several browsers and platforms
Table Row <TR> </TR> Can over-ride table settings for BGCOLOR
Vertical Alignment <TR VALIGN=TOP | MIDDLE | BOTTOM>
Table Cell <TD> </TD> Can over-ride table and row settings for BGCOLOR, VALIGN
No Linebreaks <TD NOWRAP>
Columns to Span <TD COLSPAN=?>
Rows to Span <TD ROWSPAN=?>
Desired Width <TD WIDTH ? | %> in pixels or percent of table width
8 HTML 4.01 Specification MarkUp Tag List
Frames
Frames
Miscellaneous
Cascading Style Sheets
HTML tags were originally designed to specify the type of content contained in them , and the layout was supposed to be defined by the browser. As web pages became more complex, designers wanted more control over the layout and the major browsers added extra tags (such as <FONT>) and attributes (such as COLOR) to specify layout.
The HTML 4.01 specification attempts to clearly separate content and its layout by using style sheets to define layout. Further information on using style sheets can be found in document ALL 10 Cascading
Description Tag Notes
Frame Document <FRAMESET> </FRAMESET> instead of <BODY> tags
Row Heights <FRAMESET ROWS=, , , > in pixels, %, or use * for relative size
Column Widths <FRAMESET COLS=, , , > in pixels, %, or use * for relative size
Border Width <FRAMESET BORDER=?> in pixels
Border Color <FRAMESET BORDERCOLOR=“#rrg-gbb”>
Define Frame <FRAME> </FRAME>
Display Document <FRAME SRC=“URL”>
Frame Name <FRAME NAME=“***” | _blank | _self | _parent | _top>
see link target window on page 5 for explanation of options
Margin Width <FRAME MARGINWIDTH=?> left and right margins
Margin Height <FRAME MARGINHEIGHT=?> top and bottom margins
Scrollbar? <FRAME SCROLLING=YES | NO | AUTO>
Not Resizable <FRAME NORESIZE>
Borders <FRAME BORDER=?> in pixels
Border Color <FRAME BORDERCOLOR=“#rrggbb”>
Unframed Content <NOFRAMES> </NOFRAMES content viewable in no-frames browser; includes the <BODY> tags
Description Tag Notes
Comment <!-- *** --> not displayed by browser
Meta Information <META> must be in header
Style Sheets <STYLE> </STYLE>
HTML 4.01 Specification MarkUp Tag List 9
Cascading Style Sheets
Style Sheets. Style sheets are supported in versions 4 and up of Netscape and versions 3 and up of Internet Explorer. Style can be added to HTML tags using the syntax (NN4 has problems with styles in the LI tag):
<tag STYLE=“property 1: value1; property2: value1, value2;”>
Following is a list of the most common and wisely-implemented properties and values. For a mas-ter compatibility chart, consult:
http://www.webreview.com/style/css1/charts/mastergrid.shtml
Length Values
Font Properties
Color and Background Properties
Unit Description
% percentage of something
in, cm, mm standard measurements: inches, centimeters, millimeters
em 1em is the font size of the current element (not implemented in IE3)
ex the x-height of the font (in theory); usually one-half of 1em (not implemented in IE3)
pt point (1/72 of an inch)
pc pica (12 points)
px pixels
Property Values Notes
font-family font name, serif, sans-serif, monospace
use a specific font or browser-default font of a given type; can specify several separated by commas, browser will use the first one it has
font-style normal, italic not implemented in IE3 for Windows
font-weight normal, bold, bolder, 100, 200, ..., 900
100-900 define thin through thick, with 400 as normal, 700 as bold; numbers and “normal” not implemented in IE3; “bolder” not implemented in IE3 NN4 for Mac
font-size xx-small, x-small, small, medium, large, x-large, xx-large, larger, smaller, length, %
browsers implement xx-small through xx-large slightly differently; keywords produce buggy results in IE in general
Property Values Notes
color rgb(?, ?, ?), #rrggbb several color names, while not part of the stan-dard, are supported (such as black); rgb nota-tion uses three decimal numbers 0-255
background-color rgb(?, ?, ?), #rrggbb, transparent
buggy in NN4, not implemented in IE3
background- image url, none
background-repeat repeat, no-repeat, repeat-x, repeat-y
not implemented in IE3
background-attachment fixed, scroll not implemented in NN4 or IE3
10 HTML 4.01 Specification MarkUp Tag List
ISO Latin Codes - Special Characters
Descriptio
quotation mark
ampersand
less-than sign
Text Properties
List Properties
ISO Latin Codes - Special Characters
This is a comprehensive list of the ISO Latin codes for use on the World Wide Web. These codes have evolved from a character set related to the Hyper-G Text Format.
For each symbol there exists an entity name and an older code name. They are equivalent. The entity names are approved in the latest version of HTML but are not guaranteed to work on other browsers than Netscape or Microsoft Internet Explorer. To ensure readability by the largest possible audience use the code translations.
• ISO codes always begin with an ampersand(&) and end with a semicolon(;).
• ISO codes should always be typed in lowercase.
Property Values Notes
text-decoration none, underline, overline, line-through
of these, only line-through is compatible with NN4 and IE3
vertical-align baseline, sub, super not compatible with NN4 or IE3
text-transform capitalize, uppercase, lowercase, none
text-align left, right, center, justify justify is buggy when used within tables for NN4; justify doesn’t work at all in IE3 (all platforms) or IE4 for Mac
text-indent length, % indents first line
line-height number, length, % number multiplied by font size for total spacing; possibly buggy in NN4, IE3; number not supported by IE3
Property Values Notes
list-style-type disc, circle, square, decimal, lower-roman, upper-roman, lower-alpha, upper-alpha, none
not compatible with IE3; “none” displays as question marks in Mac NN4
list-style-image url, none not compatible with NN4, IE3
n Code Entity Name Description Code Entity Name
" --> “ " --> “ capital I, circumflex accent Î --> Î Î --> Î
& --> & & --> & capital I, dieresis or umlaut mark
Ï --> Ï Ï --> Ï
< --> < < --> < capital Eth, Icelandic Ð --> ‹ Ð --> ‹
HTML 4.01 Specification MarkUp Tag List 11
ISO Latin Codes - Special Characters
Ñ --> Ñ
Ò --> Ò
Ó --> Ó
Ô --> Ô
Õ --> Õ
Ö --> Ö
× --> x
Ø --> Ø
Ù --> Ù
Ú --> Ú
Û --> Û
Ü --> Ü
Ý --> †
Þ --> ?
ß --> ß
à --> à
á --> á
â --> â
ã --> ã
ä --> ä
å --> å
æ --> æ
ç --> ç
è --> è
é --> é
ê --> ê
ë --> ë
ì --> ì
í --> í
Entity Name
greater-than sign > --> > > --> > capital N, tilde Ñ --> Ñ
non-breaking space   --> --> capital O, grave accent Ò --> Ò
inverted exclamation mark
¡ --> ¡ ¡ --> ¡ capital O, acute accent Ó --> Ó
cent sign ¢ --> ¢ ¢ --> ¢ capital O, circumflex accent Ô --> Ô
pound sign £ --> £ £ --> £ capital O, tilde Õ --> Õ
currency sign ¤ --> ¤ ¤ --> ¤ capital O, dieresis or umlaut mark
Ö --> Ö
yen sign ¥ --> ¥ ¥ --> ¥ multiplication sign × --> x
broken vertical bar ¦ --> | ¦ --> | capital O, slash Ø --> Ø
section sign § --> § § --> § capital U, grave accent Ù --> Ù
spacing diaresis ¨ --> ¨ ¨ --> ¨ capital U, acute accent Ú --> Ú
copyright sign © --> © © --> © capital U, circumflex accent Û --> Û
feminine ordinal indi-cator
ª --> ª ª --> ª capital U, dieresis or umlaut mark
Ü --> Ü
angle quotation mark, left
« --> « « --> « capital Y, acute accent Ý --> †
negation sign ¬ --> ¬ ¬ --> ¬ capital THORN, Icelandic Þ --> ?
soft hyphen ­ --> – ­ --> – small sharp s, German (sz ligature)
ß --> ß
circled R registered sign
® --> ® ® --> ® small a, grave accent à --> à
spacing macron ¯ --> ¯ &hibar; --> ¯ small a, acute accent á --> á
degree sign ° --> ° ° --> ° small a, circumflex accent â --> â
plus-or-minus sign ± --> ± ± --> ± small a, tilde ã --> ã
superscript 2 ² --> 2 ² --> 2 small a, dieresis or umlaut mark
ä --> ä
superscript 3 ³ --> 3 ³ --> 3 small a, ring å --> å
spacing acute ´ --> ´ ´ --> ´ small ae diphthong (liga-ture)
æ --> æ
micro sign µ --> µ µ --> µ small c, cedilla ç --> ç
paragraph sign ¶ --> ¶ ¶ --> ¶ small e, grave accent è --> è
middle dot · --> · · --> · small e, acute accent é --> é
spacing cedilla ¸ --> ¸ ¸ --> ¸ small e, circumflex accent ê --> ê
superscript 1 ¹ --> 1 ¹ --> 1 small e, dieresis or umlaut mark
ë --> ë
masculine ordinal indi-cator
º --> º º --> º small i, grave accent ì --> ì
angle quotation mark, right
» --> » » --> » small i, acute accent í --> í
Description Code Entity Name Description Code
12 HTML 4.01 Specification MarkUp Tag List
HexaDecimal Color Triplets
fraction 1/4
fraction 1/2
fraction 3/4
inverted questio
capital A, grave
capital A, acute
capital A, circumaccent
capital A, tilde
capital A, dieresumlaut mark
capital A, ring
capital AE dipht(ligature)
capital C, cedilla
capital E, grave
capital E, acute
capital E, circumaccent
capital E, dieresumlaut mark
capital I, grave a
capital I, acute a
Descriptio
HexaDecimal Color Triplets
These are the six-digit codes that define the colors of elements such as background, text, and hypertext links. There are two hex digits each for the intensity of the red, green and blue parts of a pixel. The best way to pick web-safe colors is to use one of the many available web color wheels. An example of one may be found at:
http://html-color-codes.com/
¼ --> π ¼ --> π small i, circumflex accent î --> î î --> î
½ --> ∏ ½ --> ∏ small i, dieresis or umlaut mark
ï --> ï ï --> ï
¾ --> ≤ ¾ --> ≤ small eth, Icelandic ð --> › ð --> ›
n mark ¿ --> ¿ ¿ --> ¿ small n, tilde ñ --> ñ ñ --> ñ
accent À --> À À --> À small o, grave accent ò --> ò ò --> ò
accent Á --> Á Á --> Á small o, acute accent ó --> ó ó --> ó
flex  -->   -->  small o, circumflex accent ô --> ô ô --> ô
à --> à à --> à small o, tilde õ --> õ õ --> õ
is or Ä --> Ä Ä --> Ä small o, dieresis or umlaut mark
ö --> ö ö --> ö
Å --> Å Å --> Å division sign ÷ --> ÷ ÷ --> ÷
hong Æ --> Æ Æ --> Æ small o, slash ø --> ø ø --> ø
Ç --> Ç Ç --> Ç small u, grave accent ù --> ù ù --> ù
accent È --> È È --> È small u, acute accent ú --> ú ú --> ú
accent É --> É É --> É small u, circumflex accent û --> û û --> û
flex Ê --> Ê Ê --> Ê small u, dieresis or umlaut mark
ü --> ü ü --> ü
is or Ë --> Ë Ë --> Ë small y, acute accent ý --> ‡ ý --> ‡
ccent Ì --> Ì Ì --> Ì small thorn, Icelandic þ --> ? þ --> ?
ccent Í --> Í Í --> Í small y, dieresis or umlaut mark
ÿ --> ÿ ÿ --> ÿ
n Code Entity Name Description Code Entity Name
HTML 4.01 Specification MarkUp Tag List 13