HOSTILE : Categories Reference
This is a nice table of HTML tags by category, with basic element reminders.
The categorizations here are partially based on the official ones in the standard for HTML4.0 and are also based on my own sick ways.
Please don't expect this to be too complete since I'm sure I missed something important somewhere along the way. =)
R=End Tag Required,
O=End Tag Optional,
F=End Tag Forbidden,
U=Unique (only one per Doc.),
N=Nestable (can contain other block elements),
D=Element Deprecated
| Document Metadata | ||
|---|---|---|
| Element | Notes | Description |
!DOCTYPE |
F U | Declares the document as HTML and calls for the proper DTD |
HTML |
R U | Delineates the HTML content of the document |
HEAD |
R U | Delineates the Header of the document |
BODY |
R U | Delineates the Content of the document |
| Header Tags | ||
| Element | Notes | Description |
TITLE |
R U | Title of the document, only displayed in browser bar |
BASE |
F U | Set a base URL for relative URLs to tree from |
BASEFONT |
F U D | Sets a base font size on the document, USE CSS NOW |
LINK |
F | Links a document with other resources, like style sheets |
META |
F | Generic Metadata container |
OBJECT |
R | Generic data/code object container and declaration (see PARAM) also allowed in BODY |
PARAM |
F | Named data or run-time parameter for and only allowed in OBJECT |
APPLET |
R D | Java code object container and declaration, Deprecated in favor of OBJECT, also in BODY |
SCRIPT |
R | Embedded program code. Also allowed in BODY |
STYLE |
R | Embedded cascading style sheet data |
| Body Tags: Blocks | ||
| Element | Notes | Description |
P |
O | Basic paragraph container |
PRE |
R | Preformatted text container |
H1, H2, H3, H4, H5, H6 |
R | Various level headings |
UL |
R | Unordered list container, only contains LI |
OL |
R | Ordered list container, only contains LI |
LI |
O N | List item, used in OL and UL to mark each list item, LI can contain other block elements |
DL |
R | Definition list, only contains DT and DD |
DT |
O | Definition Term, the defined term in a DL usually paired
with DD |
DD |
O N | Definition of a DT, within a DL, can contain other block elements |
DIR |
R D | Directory list container, only contains LI, Deprecated in favor of UL and CSS |
MENU |
R D | Menu list container, only contains LI, Deprecated in favor of UL and CSS |
DIV |
R N | Generic block container, basically ignored without a style or language setting |
BLOCKQUOTE |
R N | Long quotation, usually indented on both sides, should contain other blocks |
HR |
F | Horizontal rule |
NOSCRIPT |
R N | Used near SCRIPT elements to provide alternate content, should contain other block elements |
ADDRESS |
R | Contact information container, often rendered as italic. |
FORM |
R N | Form container, see Form section below, should contain other blocks, but never itself. |
FIELDSET |
R N | Sub form container, see Form section below |
TABLE |
R | Table container, see Table section below |
| Body Tags: Inline: Font Style | ||
| Element | Notes | Description |
B |
R | Set text to bold, consider using STRONG instead |
I |
R D | Set text to italic, consider using EM instead |
BIG |
R | Sets text to a larger font, consider using CSS instead |
SMALL |
R | Sets text to a small font, consider using CSS instead |
TT |
R | Sets text to a "teletype" or monospaced fontface, consider using CSS instead |
STRIKE, S |
R D | Show text "struck-thru", deprecated, use CSS instead |
U |
R D | Show text underlined, deprecated, use CSS instead |
FONT |
R D | Set font rendering, deprecated, use CSS instead |
CENTER |
R D | Set text to centered, deprecated, use CSS instead |
| Body Tags: Inline: Phrase | ||
| Element | Notes | Description |
EM |
R | Emphasis on text, usually italics for printed text |
STRONG |
R | Stronger emphasis on text, ususally bold for printed text |
CITE |
R | Citation or reference to other sources |
DFN |
R | Defining instance of a term |
CODE |
R | Fragment of computer code, usually in monospace font |
SAMP |
R | Sample output of computer code, usually in monospace font |
KBD |
R | Text to type on a keyboard, usually in monospace font |
VAR |
R | Variable in computer code or math, usually italic |
ABBR |
R | Abbreviation, the expansion is in a title= attribute |
ACRONYM |
R | Acronym, the expansion is in a title= attribute |
| Body Tags: Inline: Special | ||
| Element | Notes | Description |
A |
R | Anchor link, name= anchors, href= links |
IMG |
F | Inserts an image into the flow, src= links the source |
OBJECT |
R | Generic data/code object container and declaration (see PARAM) also allowed in HEAD |
PARAM |
F | Named data or run-time parameter for and only allowed in OBJECT |
APPLET |
R D | Java code object container and declaration, Deprecated in favor of OBJECT, also in HEAD |
IFRAME |
R | This allows creating a frame within a BODY, consider using OBJECT where possible |
BR |
F | Inserts a line break into the document flow |
SPAN |
R | Generic inline container, ignored without a style or language setting |
SCRIPT |
R | Embedded program code. Also allowed in HEAD |
MAP |
R | Creates a client side link map on an object or image, see AREA |
AREA |
R | Declares a linkable area in and is only used in a MAP |
Q |
R | Short quotes, should add the quotation marks automatically |
SUB |
R | Subscripts text, lowering the text's baseline without other effects |
SUP |
R | Superscripts text, raising the text's baseline without other effects |
BDO |
R | Bidirectional override, allows the setting of text display direction |
| Body Tags: Form Section | ||
| Element | Notes | Description |
INPUT |
F | Input field, name=, value=, and type= are key atttributes |
BUTTON |
R | Like INPUT buttons only more options. Cannot contain A, or any other element in this Form Section |
SELECT |
R | Selection menu, key attribute is name=, contains only OPTION and OPTGROUP |
OPTGROUP |
R | Option subgrouping, currently doesn't require nesting in itself, only contains OPTION, key attribute is label= |
OPTION |
O | Individual options in a SELECT key attributes are lable= and value= |
TEXTAREA |
R | Large text entry window, key attributes are name=, rows=, and cols=, contained text becomes it's default |
ISINDEX |
F D | Single entry instant form, deprecated in favor of FORM and INPUT |
LABEL |
R | Attaches a label to another Form element, key attribute is idref= which should match the value of the Form element's id= attribute |
FIELDSET |
R | Groups Form elements, see LEGEND |
LEGEND |
R | Adds a caption to and is only allowed in a FIELDSET |
| Body Tags: Table Section | ||
| Element | Notes | Description |
TR |
R | Table row container, only contains TD and/or TH |
TH |
R N | Table cell formated as a header. Usually centered and bold |
TD |
R N | Table cell |
CAPTION |
R | Table caption, formatted as plain text outside the table, unique per table, must follow the TABLE open tag directly |
THEAD |
O | Row grouping element defining the table headers, only contains TR should precede TBODY to allow rendering |
TFOOT |
O | Row grouping element defining the table footers, only contains TR should precede TBODY to allow rendering |
TBODY |
O | Row grouping element defining the table body, only contains TR see THEAD and TBODY |
COLGROUP |
O | Used to group columns for variant rendering, only contains COL, should precede any table content or row grouping tags |
COL |
F | Used to apply style or rendering hints to individual columns, only allowed in COLGROUP |
| Frame Tags | ||
| Element | Notes | Description |
FRAMESET |
R | FRAMESET appears in the place of BODY and contains FRAMESET and FRAME elements and one NOFRAME. This tag allows a HTML file to declare a multiple pane window each with HTML files loaded,
important attributes are rows= and cols= |
FRAME |
R | Only in a FRAMESET this specifies what HTML src= sould be loaded into a single frame defined in the containing FRAMESET |
NOFRAMES |
R U | Declares the content to display if the browser cannot render Frame documents |
Back to the Main page.
©