Class HTMLElements

java.lang.Object
HTMLElements

public final class HTMLElements extends Object
Contains static methods which group HTML element names by the characteristics of their associated elements.

An HTML element is a normal element with a name that matches one of the HTML element names (ignoring case). This type of element spans the logical HTML element as described in the HTML 4.01 specification section 3.2.1, which may be implicitly terminated if it specifies an optional end tag.

The term Non-HTML element refers to a normal element with a name that does not match one of the HTML element names. This type of element must be either a single tag element or explicitly terminated.

All of the sets returned by the methods in this class may be modified to customise the behaviour of the parser. Care must be taken however to ensure that the sets only contain tag names in lower case.

Below is a table summarising the default characteristics of each HTML element. See also the index of elements in the HTML 4.01 specification and draft HTML5 specification for the official tables containing similar information.

NameversBox TypeStart TagEnd TagNestDepr.Description / Specification
A Inline RequiredNF anchor
ABBR Inline Required  abbreviated form (e.g., WWW, HTTP, etc.)
ACRONYM Inline Required  acronym
ADDRESS Block RequiredNF information on author
APPLET Inline RequiredNFDJava applet
AREA   ForbiddenNF client-side image map area
article5Block Required  self-contained syndicatable or reusable composition
aside5Block Required  sidebar for tangentially related content
audio5  Required  audio player
B Inline Required  bold text style
BASE   ForbiddenNF document base URI
BASEFONT Inline ForbiddenNFDbase font size
bdi5Inline Required  text directionality isolation
BDO Inline Required  I18N BiDi over-ride
BIG Inline Required  large text style
BLOCKQUOTE Block Required  long quotation
BODY  OptionalOptional (details)NF document body
BR Inline ForbiddenNF forced line break
BUTTON Inline RequiredNF push button
canvas5  Required  scriptable bitmap canvas
CAPTION   RequiredNF table caption
CENTER Block Required Dshorthand for DIV align=center
CITE Inline Required  citation
CODE Inline Required  computer code fragment
COL   ForbiddenNF table column
COLGROUP   Optional (details)NF table column group
command5  ForbiddenNF menu command
datalist5  RequiredNF container for options for combo box control
DD   Optional (details)  definition description
DEL Inline Required  deleted text
details5Block Required  disclosure control for hiding details
DFN Inline Required  instance definition
DIR Block Required Ddirectory list
DIV Block Required  generic language/style container
DL Block Required  definition list
DT   Optional (details)  definition term
EM Inline Required  emphasis
embed5  ForbiddenNF plugin
FIELDSET Block Required  form control group
figcaption5  Required  caption for figure
figure5  Required  figure with optional caption
FONT Inline Required Dlocal change to font
footer5Block Required  footer for a page or section
FORM Block RequiredNF interactive form
FRAME   ForbiddenNF subwindow
FRAMESET   Required  window subdivision
H1 Block Required  heading
H2 Block Required  heading
H3 Block Required  heading
H4 Block Required  heading
H5 Block Required  heading
H6 Block Required  heading
HEAD  OptionalOptional (details)NF document head
header5Block Required  introductory or navigational aids for a page or section
hgroup5Block RequiredNF heading group
HR Block ForbiddenNF horizontal rule
HTML  OptionalOptional (details)NF document root element
I Inline Required  italic text style
IFRAME Inline RequiredNF inline subwindow
IMG Inline ForbiddenNF Embedded image
INPUT Inline ForbiddenNF form control
INS Inline Required  inserted text
ISINDEX Block ForbiddenNFDsingle line prompt
KBD Inline Required  text to be entered by the user
keygen5Inline ForbiddenNF cryptographic key-pair generator form control
LABEL Inline RequiredNF form field label text
LEGEND   RequiredNF fieldset legend
LI   Optional (details)  list item
LINK   ForbiddenNF a media-independent link
MAP Inline Required  client-side image map
mark5Inline Required  highlight
MENU Block Required Dmenu list
META   ForbiddenNF generic metainformation
meter5Inline Required  gauge
nav5Block Required  section with navigational links
NOFRAMES Block Required  alternate content container for non frame-based rendering
NOSCRIPT Block Required  alternate content container for non script-based rendering
OBJECT Inline Required  generic embedded object
OL Block Required  ordered list
OPTGROUP   RequiredNF option group
OPTION   Optional (details)NF selectable choice
output5Inline Required  calculated output value
P Block Optional (details)NF paragraph
PARAM   ForbiddenNF named property value
PRE Block Required  preformatted text
progress5Inline Required  progress bar
Q Inline Required  short inline quotation
ruby5Inline Required  ruby annotation(s)
rp5Inline RequiredNF parenthesis for ruby annotation text
rt5Inline RequiredNF ruby annotation text
S Inline Required Dstrike-through text style
SAMP Inline Required  sample program output, scripts, etc.
SCRIPT Inline RequiredNF script statements
section5Block Required  generic document or application section
SELECT Inline RequiredNF option selector
SMALL Inline Required  small text style
source5  ForbiddenNF media source for video or audio
SPAN Inline Required  generic language/style container
STRIKE Inline Required Dstrike-through text
STRONG Inline Required  strong emphasis
STYLE   RequiredNF style info
SUB Inline Required  subscript
summary5  Required  caption for details
SUP Inline Required  superscript
TABLE Block Required  table
TBODY  OptionalOptional (details)  table body
TD   Optional (details)  table data cell
TEXTAREA Inline RequiredNF multi-line text field
TFOOT   Optional (details)  table footer
TH   Optional (details)  table header cell
THEAD   Optional (details)  table header
time5Inline Required  date and/or time
TITLE   RequiredNF document title
TR   Optional (details)  table row
TT Inline Required  teletype or monospaced text style
U Inline Required Dunderlined text style
UL Block Required  unordered list
VAR Inline Required  instance of a variable or program argument
video5  Required  video player
wbr5Inline ForbiddenNF line breaking opportunity
See Also: