Main /

Html Body Elements


[-edit SideBar-]

Html Body Elements

HTML BODY Elements

HTML v3.2 or older

NameTypeChild ofAttributesEnd Tag?DescriptionReplacement
ACRONYM deprecated – use <ABBR>
DIR multicolumn directory listdeprecated – use <UL>
ISINDEXprompt single-line text inputdeprecated – use <INPUT type=text>
MENU single-column directory listdeprecated in v4 – use <UL>


beginning in HTML version 4, all body elements have the "class", "id", "style" and "title" attributes.

NameTypeChild ofAttributesEnd Tag?DescriptionReplacement
BODY(background, bgcolor, text, link, vlink, alink)Optdocument body
Aspecialcharset, href, name, rel, rev, title anchor
Bfont-- bold text style
BIGfont-- ++large text style++
BLOCKQUOTEblockcite long quotation
BRspecialclear noneNoforced line break
CENTERblock center alignmentwill be dropped in HTML 5 – use <DIV align=center> or <STYLE> { text-align:center; }
CODEphrase computer code fragment
DIV generic block container
EMphrase emphasis
FONTfontsize, color local change to fontwill be dropped in HTML 5 – use <SPAN> with <STYLE> { font }
H1align heading
H2align heading
H3align heading
H4align heading
H5align heading
H6align heading
HRblockalign, noshade, size, widthNohorizontal rule
Ifont-- italic text style
IFRAMEalign, height, longdesc, name, src, width (frameborder, marginheight, marginwidth, scrolling) inline subwindow
IMGspecialalign, alt, border, height, ismap, longdesc, src, usemap, width (hspace, name, vspace)NoEmbedded image
LISTINGspecialunformatted listuse <PRE>
OBJECTdata, height, name, tabindex, type, usemap, width (archive, border, classid, codebase, codetype, declare, hspace, standby, vspace) generic embedded object
PARAMOBJECTname, value (type, valuetype)Nonamed property value
OLtype(=1/a/A/i/I) (compact) 1 ordered list
ULtype(=circle/disc/square) (compact) * unordered list
LIOL, ULtypeOptlist item
PLAINTEXTspecialNoplain text for the rest of the docuse <PRE>
PREblock(width) preformatted text
Q short inline quotation
S strike-through textuse <SPAN> with <STYLE> { text-decoration:line-through; }
SMALLfont-- --small text style--
SPAN generic inline container
STRIKEfont-- strike-through textwill be dropped in HTML 5 – use <SPAN> with <STYLE> { text-decoration:line-through; }
STRONGphrase strong emphasis
SUBfont subscript
SUPfont superscript
TTfont-- teletype/monospaced text
Ufont-- underlined text styleuse <SPAN> with <STYLE> { text-decoration:underline; }
XMPspecialignore all html except </xmp>use <PRE> with <CODE> and escape "<" as &1t;


beginning in HTML version 5, all body elements have the "dir", "lang" and "tabindex" attributes (in addition to v4īs "class", "id", "style" and "title").
"aria-*", "contenteditable", "contextmenu", "draggable", "role" and "spellcheck" are new global attributes.
Attributes "align", "valign" are stripped from all elements. They say you should use CSS for that.

NameTypeChild ofAttributesEnd Tag?DescriptionReplacement
BODY--Optdocument bodyall attributes dropped.
Aspecialhref, media, name, ping, rel, target, title anchor. the ping attribute allows user tracking on external links.Attributes "charset" and "rev" are being dropped.
ARTICLEcite for citations
ASIDE for off-topic parts
AUDIOpreload, sourceattribute "preload" was formerly named "autobuffer"
Bfont-- bold text style
BLOCKQUOTEblock long quotation
BRspecialnoneNoforced line breakattribute "clear" is being dropped.
CANVASdrawing or graphics area
CODEphrase computer code fragment
COMMANDReq.very similar to BUTTON tag
DIVblock generic block container
EMphrase emphasis
EMBEDfor plugins
H1(HGROUP)align heading
H2(HGROUP)align heading
H3(HGROUP)align heading
H4(HGROUP)align heading
H5(HGROUP)align heading
H6(HGROUP)align heading
HRblockNohorizontal ruleall attributes dropped.
Ifont-- italic text style
IFRAMEheight, longdesc, name, sandbox, seamless, src, srcdoc, width inline subwindow"frameborder", "marginheight", "marginwidth" and "scrolling" attributes are being dropped.
IMGspecialalt, border, height, ismap, src, usemap, widthNoEmbedded imageAttributes "hspace", "longdesc", "name" and "vspace" are being dropped.
LISTINGspecialunformatted listuse <PRE>
MARKmarked text
MENUlabel, typepage menuun-deprecated, purpose has changed!
METERform, low, high, optimum, max, min, valueshows a gauge meter that is not a progress bar. may be associated with a form.
NAVblock containing navigation links
OBJECTdata, height, name, tabindex, type, usemap, width generic embedded objectattributes archive, border, classid, codebase, codetype, declare, standby and vspace are being dropped.
PARAMOBJECTname, valueNonamed property valueattributes "type" and "valuetype" are being dropped.
OLreversed, start 1 ordered listattributes "compact" and "type" are being dropped.
UL * unordered listattributes "compact" and "type" arebeing dropped.
LIOL, ULvalueOptlist item"type" attribute is being dropped.
PLAINTEXTspecialNoplain text for the rest of the docuse <PRE>
PREblock preformatted text"width" attribute is being dropped.
Q short inline quotation
RPRUBYcharacter annotations for eastern languages
RTRUBYcharacter annotations for eastern languages
SECTIONcite structures the document into sections
SMALLfont-- --small text style--
SPAN generic inline container
STRONGphrase strong emphasis
SUBfont subscript
SUPfont superscript
TIMEdate and/or time
VIDEOpreload, sourceattribute "preload" was formerly named "autobuffer"
XMPspecialignore all html except </xmp>use <PRE> with <CODE> and escape "<" as &1t;
Recent Changes (All) | Edit SideBar Page last modified on June 12, 2011, at 11:27 PM Edit Page | Page History
Powered by TechnoloWiki