HTML Summary of Elements and Attributes
The following is a list of all the elements and attributes that you may need to use in your web page. Note that the list excludes proprietary and deprecated elements and attributes since there is always a better alternative to those.
Mandatory attributes are marked (M) and those which are not mandatory but where the element is meaningless without it are marked (R). I have also marked those elements and attributes that are still valid but which serve no useful purpose. (+) = use the stylesheet equivalent, (#) = will confuse your visitors, ($) = not supported by current browsers, (@) = redundant
The following attributes can be used on any element within the body of the page: class, dir, id, lang, style, title
Structural
- doctype (R)
- html (R)
- lang, xml:lang (xhtml only) xmlns (xhtml only)
- head (R)
- profile
- body (R)
- h1
- h2
- h3
- h4
- h5
- h6
- div
- p
- blockquote
- cite
- br
- hr (+)
Head Elements
- title (M)
- meta
- content (M), http-equiv, name, scheme
- base
- href, target
- link
- charset, href, media, rel, rev
- style
- media, type (M)
- script
- charset, defer, src, type (M)
Text Formatting
- a
- accesskey (#), charset($), coords, href (R), hreflang ($), rel, rev, shape, tabindex (#)
- em
- strong
- strike
- sub
- sup
- b
- i
- q
- cite
- del
- cite, datetime ($)
- ins
- cite, datetime ($)
- span
- address
- abbr
- title (R)
- acronym
- title (R)
- cite
- pre
- dfn
- code
- kbd
- samp
- tt
- var
- big
- small
- bdo
- dir (M)
- noscript (@)
- ruby ($)
- rbc ($)
- rb ($)
- rp ($)
- rtc ($)
- rt ($)
- rbspan ($)
Lists
- ol
- ul
- li
- dl
- dt
- dd
Tables
- table
- border (+), cellpadding (+), cellspacing (+), frame (+), rules (+), summary, width (+)
- caption
- colgroup
- align (+), char ($), charoff ($), span, valign (+), width (+)
- col
- align (+), char ($), charoff ($), span, valign (+), width (+)
- thead
- align (+), char ($), charoff ($), valign (+)
- tbody (R within table)
- align (+), char ($), charoff ($), valign (+)
- tfoot
- align (+), char ($), charoff ($), valign (+)
- tr (M within table)
- align (+), char ($), charoff ($), valign (+)
- th
- abbr, align (+), axis ($), char ($), charoff ($), colspan, headers (#), rowspan, scope, valign (+), width (+)
- td
- abbr, align (+), axis ($), char ($), charoff ($), colspan, headers, rowspan, scope (#), valign (+), width (+)
Forms
- form
- accept-charset, action (M), enctype, method, name
- fieldset (R within form)
- legend
- accesskey (#)
- label
- accesskey (#), for (M)
- input
- accept ($), accesskey (#), alt, checked, disabled, maxlength, name, readonly, size (+), src, tabindex (#), type (R), usemap, value
- textarea
- accesskey (#), cols (M), disabled, name, readonly, rows (M), tabindex (#)
- select
- accesskey (#), disabled, multiple, name, size (+), tabindex (#)
- optgroup
- label (M)
- option
- disabled ($), label ($), selected, value
- button
- accesskey (#), disabled, name, tabindex (#), type, value
Media
- img
- alt (M), height, ismap, longdesc, name, src (M), usemap, width
- object
- archive, classid, codebase, codetype, data, declare ($), height, standby ($), tabindex (#), type, usemap, width
- param
- name (M), type, value, valuetype
- map
- name (M)
- area
- accesskey (#), alt (M), coords, href, nohref (@), shape, tabindex (#)


