HTML Elements

HTML catagorizes elements into specific categories. The two main types of HTML element categories are:

  • Block - Include a line break before and after the element.
  • Inline - Included with the text as part of a line.

See the section called "HTML Element Categories" for a list of block and inline elements with short descriptions.

In HTML there are specific rules with regard to what elements a specific element may contain. For example some elements may only be contained in the HEAD header element. The paragraph element may not contain block elements. The table below lists elements and what they may contain:

NameContained Elements
Ainline elements except A
ABBRinline elements
ACRONYMinline elements
ADDRESSinline elements
APPLETPARAM, inline elements block elements
AREAnone
Binline elements
BASEnone
BASEFONTnone
BDOinline elements
BIGinline elements
BLOCKQUOTEblock elements, SCRIPT
BODYinline elements, block elements
BRnone
BUTTONinline elements excluding A, BUTTON, INPUT, LABEL, IFRAME, SELECT, and TEXTAREA
CENTERinline elements, block elements
CITEinline elements
CODEinline elements
DDinline elements
DELinline elements, block elements
DFNinline elements
DIRLI excluding block elements
DIVinline elements, block elements
DLDD, DT
DTinline elements, block elements
EMinline elements
FIELDSETinline elements, block elements, LEGEND
FONTinline elements
FORMblock elements excluding FORM
FRAMEnone
FRAMESETFRAMESET, FRAME, NOFRAMES
H1-H6inline elements
HEADBASE, ISINDEX, LINK, META, OBJECT, SCRIPT, STYLE, TITLE
HRnone
Iinline elements
IFRAMEinline elements, block elements
IMGnone
INPUTinline elements, block elements excluding BUTTON
INSinline elements, block elements
ISINDEXnone
HTMLHEAD, BODY, FRAMESET
KBDinline elements
LABELinline elements excluding LABEL
LEGENDinline elements
LIinline elements, block elements (MENU and DIR list items exclude block elements)
LINKnone
MAPblock elements, AREA
MENULI not containing block elements
METAnone
NOFRAMESinline elements, block elements, BODY
NOSCRIPTinline elements, block elements
OBJECTPARAM, inline elements block elements
OLLI
OPTGROUPOPTION
OPTIONnone (text)
Pinline elements
PARAMnone
PREinline elements excluding APPLET, BIG, BASEFONT, FONT, IMG, OBJECT, SMALL, SUB, SUP
Qinline elements
Sinline elements
SAMPinline elements
SELECTOPTION, OPTGROUP
SCRIPTnone (script program)
SMALLinline elements
SPANinline elements
STRIKEinline elements
STRONGinline elements
STYLEnone (A style sheet)
SUBinline elements
SUPinline elements
TBODYTR
TDinline elements, block elements
TFOOTTR
THinline elements, block elements
THEADTR
TRTH,TD
TEXTAREAnone (text)
TITLEnone
TTinline elements
Uinline elements
ULLI
VARinline elements