|
BASIC ELEMENTS
|
|||
|---|---|---|---|
| Document Type | <html></html> | (beginning and end of file) | |
| Title | <title></title> | (must be in header) | |
| Header | <head></head> | (descriptive info, such as title) | |
| Body | <body></body> | (bulk of the page) | |
|
STRUCTURAL DEFINITION
|
|||
|---|---|---|---|
| Heading | <h?></h?> | (the spec. defines 6 levels) | |
| Align Heading | <h? align=left|center|right></h?> | ||
| Division | <div></div> | ||
| Align Division | <dig align=left|right|center|justify></div> | ||
| 4.0 | Defined Content | <span></span> | |
| Block Quote | <blockquote></blockquote> | (usually indented) | |
| 4.0 | Quote | <q></q> | (for short quotations) |
| 4.0 | Citation | <q cite="url"></q> | |
| Emphasis | <em></em> | (usually displayed as italic) | |
| Strong Emphasis | <strong></strong> | (usually displayed as bold) | |
| Citation | <cite></cite> | (usually italics) | |
| Code | <code></code> | (for source code listings) | |
| Sample Output | <samp></samp> | ||
| Keyboard Input | <kbd></kbd> | ||
| Variable | <var></var> | ||
| Definition | <dfn></dfn> | (not widely implemented) | |
| Author's Address | <address></address> | ||
| Large Font Size | <big></big> | ||
| Small Font Size | <small></small> | ||
| 4.0 | Insert | <ins></ins> | (marks additions in a new version) |
| 4.0 | Time of Change | <ins datetime=":::"></ins> | |
| 4.0 | Comments | <ins cite="url"></ins> | |
| 4.0 | Delete | <del></del> | (marks deletions in a new version) |
| 4.0 | Time of Change | <del datetime=":::"></del> | |
| 4.0 | Comments | <del cite="URL"></del> | |
| 4.0 | Acronym | <acronym></acronym> | |
| 4.0 | Abbreviation | <abbr></abbr> | |
|
PRESENTATION FORMATTING
|
|||
|---|---|---|---|
| Bold | <b></b> | ||
| Italic | <i></i> | ||
| 4.0* | Underline | <u></u> | (not widely implemented) |
| Strikeout | <strike></strike> | (not widely implemented) | |
| 4.0* | Strikeout | <s></s> | (not widely implemented) |
| Subscript | <sub></sub> | ||
| Superscript | <sup></sup> | ||
| Typewriter | <tt></tt> | (displays in a monospaced font) | |
| Preformatted | <pre></pre> | (display text spacing as-is) | |
| Width | <pre width=?></pre> | (in characters) | |
| Center | <center></center> | (for both text and images) | |
| N1 | Blinking | <blink></blink> | (the most derided tag ever) |
| Font Size | <font size=?></font> | (ranges from 1-7) | |
| Change Font Size | <font size="+|-?"></font> | ||
| Font Color | <font color="#$$$$$$"></font> | ||
| 4.0* | Select Font | <font face="***"></font> | |
| N4 | Point size | <font point-size=?></font> | |
| N4 | Weight | <font weight=?></font> | |
| 4.0* | Base Font Size | <basefont size=?> | (from 1-7; default is 3) |
| MS | Marquee | <marquee></marquee> | |
|
POSITIONING
|
|||
|---|---|---|---|
| N3 | Multi-Column | <multicol cols=?></multicol> | |
| N3 | Column Gutter | <multicol gutter=?></multicol> | |
| N3 | Column Width | <multicol width=?></multicol> | |
| N3 | Spacer | <spacer> | |
| N3 | Spacer Type | <spacer type=horizontal|vertical|block> | |
| N3 | Size | <spacer size=?> | |
| N3 | Dimensions | <spacer width=? height=?> | |
| N3 | Alignment | <spacer align=left|right|center> | |
| N4 | Layer | <layer></layer> | |
| N4 | Name | <layer id="***"></layer> | |
| N4 | Location | <layer left=? top=?></layer> | |
| N4 | Rel. Position | <layer pagex=? pagey=?></layer> | |
| N4 | Source File | <layer src="***"></layer> | |
| N4 | Stacking | <layer z-index=?></layer> | |
| N4 | Stack Position | <layer above="***" below="***"></layer> | |
| N4 | Dimensions | <layer height=? width=?></layer> | |
| N4 | Clipping Path | <layer clip=,,,></layer> | |
| N4 | Visible? | <layer visibility=show|hidden|inherit></layer> | |
| N4 | Background | <layer background="$$$$$$"></layer> | |
| N4 | Color | <layer bgcolor="$$$$$$"></layer> | |
| N4 | Inline Layer | <ilayer></ilayer> | (takes same attributes as layer) |
| N4 | Alt. Content | <nolayer></nolayer> | |
|
LINKS, GRAPHICS, AND SOUNDS
|
|||
|---|---|---|---|
| Link Something | <a href="URL"></a> | ||
| Link to Location | <a href="URL#***"></a> | (if in another document) | |
| <a href="#***"></a> | (if in current document) | ||
| 4.0* | Target Window | <a href="URL" target="***"></a> | |
| 4.0* | Action on Click | <a href="URL" onclick="***"></a> | (Javascript) |
| 4.0* | Mouseover Action | <a href="URL" onmouseover="***"></a> | (Javascript) |
| 4.0* | Mouse out Action | <a href="URL" onmouseout="***"></a> | (Javascript) |
| Link to Email | <a href="mailto:@"></a> | ||
| N, MS | Specify Subject | <a href="mailto:@?subject=***"></a> | (use a real question mark) |
| Define Location | <a name="***"></a> | ||
| Display Image | <img src="URL"> | ||
| Alignment | <img src="URL" align=top|bottom|middle|left|right> | ||
| N1 | Alignment | <img src="URL" align=texttop|absmiddle|baseline|absbottom> | |
| Alternate | <img src="URL" alt="***"> | (if image not displayed) | |
| Dimensions | <img src="URL" width=? height=?> | (in pixels) | |
| <img src="URL" width=% height=%> | (as percentage of page width/height) | ||
| Border | <img src="URL" border=?> | (in pixels) | |
| Runaround Space | <img src="URL" hspace=? vspace=?> | (in pixels) | |
| N1 | Low-Res Proxy | <img src="URL" lowsrc="URL"> | |
| Imagemap | <img src="URL" ismap> | (requires a script) | |
| Imagemap | <img src="URL" usemap="URL"> | ||
| MS | Movie Clip | <img dynsrc="***" start="***" loop=?> | |
| MS | Background Sound | <bgsound src="***" loop=?|infinite> | |
| Client-Side Map | <map name="***"></map> | (describes the map) | |
| Map Section | <area shape="default|rect|circle|poly" coords=",,," href="URL"|nohref> | ||
| N1 | Client Pull | <meta http-equiv="Refresh" content="?; url="URL"> | |
| N2 | Embed Object | <embed src="URL"> | (insert object into page) |
| N2 | Object Size | <embed src="URL" width=? height=?> | |
| 4.0 | Object | <object></object> | |
| 4.0 | Parameters | <param> | |
|
DIVIDERS
|
|||
|---|---|---|---|
| Paragraph | <p></p> | (closing tag often unnecessary) | |
| Align Text | <p align=left|center|right></p> | ||
| N | Justify Text | <p align=justify></p> | |
| Line Break | <br> | (a single carriage return) | |
| Clear Textwrap | <br clear=left|right|all> | ||
| Horizontal Rule | <HR> | ||
| Alignment | <hr align=left|right|center> | ||
| Thickness | <hr size=?> | (in pixels) | |
| Width | <hr width=?> | (in pixels) | |
| Width Percent | <hr width="%"> | (as a percentage of page width) | |
| Solid Line | <hr noshade> | (without the 3D cutout look) | |
| N1 | No Break | <nobr></nobr> | (prevents line breaks) |
| N1 | Word Break | <wbr> | (where to break a line if needed) |
|
LISTS
|
|||
|---|---|---|---|
| Unordered List | <ul><li></ul> | (before each list item) | |
| Compact | <ul compact></ul> | ||
| Bullet Type | <ul type=disc|circle|square> | (for the whole list) | |
| Bullet Type | <li type=disc|circle|square> | (this & subsequent) | |
| Ordered List | <ol><li></ol> | (before each list item) | |
| Compact | <ol compact></ol> | ||
| Numbering Type | <ol type=a|a|i|i|1> | (for the whole list) | |
| Numbering Type | <li type=a|a|i|i|1> | (this & subsequent) | |
| Starting Number | <ol start=?> | (for the whole list) | |
| Starting Number | <li value=?> | (this & subsequent) | |
| Definition List | <dl><dt><dd></dl> | (<dt>=term, <dd>=definition) | |
| Compact | <dl compact></dl> | ||
| Menu List | <MENU><LI></MENU> | (before each list item) | |
| Compact | <menu compact></menu> | ||
| Directory List | <dir><li></dir> | (before each list item) | |
| Compact | <dir compact></dir> | ||
|
BACKGROUNDS AND COLORS
|
||||
|---|---|---|---|---|
| Tiled Bkground | <body background="URL"> | |||
| MS | Watermark | <body bgproperties="fixed"> | ||
| Bkground Color | <body bgcolor="#$$$$$$"> | (order is red/green/blue) | ||
| Text Color | <body text="#$$$$$$"> | |||
| Link Color | <body link="#$$$$$$"> | |||
| Visited Link | <body vlink="#$$$$$$"> | |||
| Active Link | <body alink="#$$$$$$"> | |||
|
SPECIAL CHARACTERS
|
||||
|---|---|---|---|---|
| Special Character | &#?; | (where ? is the ISO 8859-1 code) | ||
| < | < | |||
| > | > | |||
| & | & | |||
| " | " | |||
| Registered TM | ® | |||
| Registered TM | ® | |||
| Copyright | © | |||
| Copyright | © | |||
| Non-Breaking Space | | |||
|
FORMS
|
|||
|---|---|---|---|
| Define Form | <form action="url" method=get|post></form> | ||
| 4.0* | File Upload | <form enctype="multipart/form-data"></form> | |
| Input Field |
<input type="text|password|checkbox|radio|
file|button|image|hidden|submit|reset"> |
||
| Field Name | <input name="***"> | ||
| Field Value | <input value="***"> | ||
| Checked? | <input checked> | (checkboxes and radio boxes) | |
| Field Size | <input size=?> | (in characters) | |
| Max Length | <input maxlength=?> | (in characters) | |
| 4.0 | Button | <button></button> | |
| 4.0 | Button Name | <button name="***"></button> | |
| 4.0 | Button Type | <button type="submit|reset|button"></button> | |
| 4.0 | Default Value | <button value="***"></button> | |
| 4.0 | Label | <label></label> | |
| 4.0 | Item Labelled | <label for="***"></label> | |
| Selection List | <select></select> | ||
| Name of List | <select name="***"></select> | ||
| # of Options | <select size=?></select> | ||
| Multiple Choice | <select multiple> | (can select more than one) | |
| Option | <option> | (items that can be selected) | |
| Default Option | <option selected> | ||
| Option Value | <option value="***"> | ||
| 4.0 | Option Group | <optgroup label="***"></optgroup> | |
| Input Box Size | <textarea rows=? cols=?></textarea> | ||
| Name of Box | <textarea name="***"></textarea> | ||
| N2 | Wrap Text | <textarea wrap=off|hard|soft></textarea> | |
| 4.0 | Group elements | <fieldset></fieldset> | |
| 4.0 | Legend | <legend></legend> | (caption for fieldsets) |
| 4.0 | Alignment | <legend align="top|bottom|left|right"></legend> | |
|
TABLES
|
|||
|---|---|---|---|
| Define Table | <table></table> | ||
| 4.0* | Table Alignment | <table align=left|right|center> | |
| Table Border | <table border></table> | (either on or off) | |
| Table Border | <table border=?></table> | (you can set the value) | |
| Cell Spacing | <table cellspacing=?> | ||
| Cell Padding | <table cellpadding=?> | ||
| Desired Width | <table width=?> | (in pixels) | |
| Width Percent | <table width=%> | (percentage of page) | |
| 4.0* | Table Color | <table bgcolor="$$$$$$"></table> | |
| 4.0 | Table Frame |
<table frame=void|above|below|hsides|lhs|rhs|
vsides|box|border></table> |
|
| 4.0 | Table Rules | <table rules=none|groups|rows|cols|all></table> | |
| MS | Border Color | <table bordercolor="$$$$$$"></table> | |
| MS | Dark Border | <table bordercolordark="$$$$$$"></table> | |
| MS | Light Border | <table bordercolorlight="$$$$$$"></table> | |
| Table Row | <TR></TR> | ||
| Alignment | <tr align=left|right|center|middle|bottom> | ||
| Table Cell | <td></td> | (must appear within table rows) | |
| Alignment | <td align=left|right|center valign=top|middle|bottom> | ||
| No linebreaks | <td nowrap> | ||
| Columns to Span | <td colspan=?> | ||
| Rows to Span | <td rowspan=?> | ||
| 4.0* | Desired Width | <td width=?> | (in pixels) |
| N3 | Width Percent | <td width="%"> | (percentage of table) |
| 4.0* | Cell Color | <td bgcolor="#$$$$$$"> | |
| Header Cell | <th></th> | (same as data, except bold centered) | |
| Alignment | <th align=left|right|center|middle|bottom> | ||
| No Linebreaks | <th nowrap> | ||
| Columns to Span | <th colspan=?> | ||
| Rows to Span | <th rowspan=?> | ||
| 4.0* | Desired Width | <th width=?> | (in pixels) |
| N3 | Width Percent | <th width="%"> | (percentage of table) |
| 4.0* | Cell Color | <th bgcolor="#$$$$$$"> | |
| 4.0 | Table Body | <tbody> | |
| 4.0 | Table Footer | <tfoot></tfoot> | (must come before thead> |
| 4.0 | Table Header | <thead></thead> | |
| Table Caption | <caption></caption> | ||
| Alignment | <caption align=top|bottom|left|right> | ||
| 4.0 | Column | <col></col> | (groups column attributes) |
| 4.0 | Columns Spanned | <col span=?></col> | |
| 4.0 | Column Width | <col width=?></col> | |
| 4.0 | Width Percent | <col width="%"></col> | |
| 4.0 | Group columns | <colgroup></colgroup> | (groups column structure) |
| 4.0 | Columns Spanned | <colgroup span=?></colgroup> | |
| 4.0 | Group Width | <colgroup width=?></colgroup> | |
| 4.0 | Width Percent | <colgroup width="%"></colgroup> | |
|
FRAMES
|
|||
|---|---|---|---|
| 4.0* | Frame Document | <frameset></frameset> | (instead of <body>) |
| 4.0* | Row Heights | <frameset rows=,,,></frameset> | (pixels or %) |
| 4.0* | Row Heights | <frameset rows=*></frameset> | (* = relative size) |
| 4.0* | Column Widths | <frameset cols=,,,></frameset> | (pixels or %) |
| 4.0* | Column Widths | <frameset cols=*></frameset> | (* = relative size) |
| 4.0* | Borders | <frameset frameborder="yes|no"></frameset> | |
| 4.0* | Border Width | <frameset border=?></frameset> | |
| 4.0* | Border Color | <frameset bordercolor="#$$$$$$"></frameset> | |
| N3 | Frame Spacing | <frameset framespacing=?></frameset> | |
| 4.0* | Define Frame | <frame> | (contents of an individual frame) |
| 4.0* | Display Document | <frame src="url"> | |
| 4.0* | Frame Name | <frame name="***"|_blank|_self|_parent|_top> | |
| 4.0* | Margin Width | <frame marginwidth=?> | (left and right margins) |
| 4.0* | Margin Height | <frame marginheight=?> | (top and bottom margins) |
| 4.0* | Scrollbar? | <frame scrolling="yes|no|auto"> | |
| 4.0* | Not Resizable | <frame noresize> | |
| 4.0* | Borders | <frame frameborder="yes|no"> | |
| 4.0* | Border Color | <frame bordercolor="#$$$$$$"> | |
| 4.0* | Unframed Content | <noframes></noframes> | (for non-frames browsers) |
| 4.0 | Inline Frame | <iframe></iframe> | (takes same attributes as FRAME) |
| 4.0 | Dimensions | <iframe width=? height=?></iframe> | |
| 4.0 | Dimensions | <iframe width="%" height="%"></iframe> | |
|
SCRIPTS AND JAVA
|
|||
|---|---|---|---|
| Script | <script></script> | ||
| Location | <script src="URL"></script> | ||
| Type | <script type="***"></script> | ||
| Language | <script language="***"></script> | ||
| 4.0* | Other Content | <noscript></noscript> | (if scripts not supported) |
| Applet | <applet></applet> | ||
| File Name | <applet code="***"> | ||
| Parameters | <applet param name="***"> | ||
| Location | <applet codebase="URL"> | ||
| Identifier | <applet name="***"> | (for references) | |
| Alt Text | <applet alt="***"> | (for non-Java browsers) | |
| Alignment | <applet align="left|right|center"> | ||
| Size | <applet width=? height=?> | (in pixels) | |
| Spacing | <applet hspace=? vspace=?> | (in pixels) | |
| N4 | Server Script | <server></server> | |
|
MISCELLANEOUS
|
|||
|---|---|---|---|
| Comment | <!-- *** --> | (not displayed by the browser) | |
| Prologue | <!doctype html public "-//w3c//dtd html 4.0//en"> | ||
| Searchable | <isindex> | (indicates a searchable index) | |
| Prompt | <isindex prompt="***"> | (text to prompt input) | |
| Send Search | <a href="URL?***"></a> | (use a real question mark) | |
| URL of This File | <base href="URL"> | (must be in header) | |
| 4.0* | Base Window Name | <base target="***"> | (must be in header) |
| Relationship | <link rev="***" rel="***" href="URL"> | (in header) | |
| N4 | Linked File | <link type="***" src="***"></link> | |
| Meta Information | <META> | (must be in header) | |
| Style Sheets | <style></style> | (implementations vary) | |
| 4.0 | Bidirect Off | <bdo dir=ltr|rtl></bdo> | (for certain character sets) |