The Periodic Table of (X)HTML Elements

This table is an attempt to record and explain all elements ever included in officially-released HTML and XHTML specifications.

The Deprecation of (X)HTML Elements

The element tables are laid out in order of deprecation level.

Current:
These elements are in current use. They are completely valid as HTML 4.01/XHTML 1.0 Strict and XHTML 1.1, so these are the elements you want.
Deprecated:
These elements are being phased out of use. They are not valid as HTML 4.01 Strict, however, they are still valid as HTML 4.01/XHTML 1.0 Transitional or Frameset. Try not to use these elements; there are probably others way to achieve their effects.
Obsolete:
These are no longer part of the specification, and may not be supported by modern browsers. They are not valid as HTML 4.01 or XHTML of any kind. To put it shortly, these elements were chucked out, so don't use them.

There are also elements floating around that were never part of any (X)HTML specification, but were simply proprietary (browser-specific). I'm not even going to mention them here. Please, do not use these elements.

Attributes

Required Attributes
These attributes must be included in the start tag
Optional Attributes
These attributes may be used in the element's start tag. Event, core, and language attributes are not listed here, as they are assumed to be useable by all elements (unless otherwise specified)
Forbidden Attributes
Events, core attributes, and language attributes may be used in all elements unless otherwise specified under forbidden attributes. The forbidden attributes fall into three categories:
Core Attributes
  • class
  • id
  • style
  • title
Language Attributes
  • lang
  • dir
Event Attributes
  • onclick
  • ondoubleclick
  • onkeydown
  • onkeypress
  • onkeyup
  • onmousedown
  • onmouseup
  • onmousemove
  • onmouseout
  • onmouseover
Some attribute groups are forbidden, but a single member of them is listed as implied or required. This is not contradictory; that one member is an implied or required attribute, the rest are forbidden.

The Elements Of HTML 4.01/XHTML 1.0 Strict

Name Element
(Group)
Element Type Empty? Attributes Description
Required Implied Forbidden

All elements contained in this table are fully valid with HTML 4.01 Strict. Any overlapping function is due to precise semantics of each element.

!-- -- Comment Not Applicable This causes the browser to ignore whatever is within the comment, useful for documentation of the page.
a Anchor Inline No none charset, coords, href, hreflang, name, onfocus, onblur, rel, rev, shape, type, accesskey, tabindex none This, with the href attribute, creates a hyperlink on the page.
abbr Abbreviation Inline No none These are used for abbreviations (acronyms are abbreviations that become accepted as words). Often the title attribute contains the full name.
acronym Acronym
address Address Block No none This is used for addresses, most often e-mail, street, or mailing addreses.
area Area Invisible Yes alt accesskey, coords, href, nohref, onfocus, onblur, shape, tabindex none This is used to create an area on an image map.
b Bold Inline No none This is used to make the content bold.
base Base Head Yes href none Core
Events
Language
This is used to specify an absolute URI from which relative URIs may be extrapolated.
bdo BiDirectional Override Inline No dir none Events This is used to override text direction within a block of text.
big Big Inline No none This is used to make text big.
blockquote Block Quote Block None-Empty none cite none This is used for long, multi-paragraph quotations.
body Body Other No none onload, onunload none This contains all elements seen in the actual webpage.
br Line Break Other Yes none none Language
Events
This is used to create a line break where it would not normally occur.
button Button inline No none accesskey, disabled, name, onfocus, onblur, tabindex, type, value none This is used to create a button.
caption Caption
(Tables)
Block No none This is used to create a table caption.
cite Cite Inline No none This is used to create a citation.
code Code Inline No none This is used for computer coding, such as that of a programming language.
col Column
(Tables)
Invisible Yes none align, char, charoff, span, valign, width none This is used to control a table columm.
colgroup Column Group
(Tables)
Invisible No none align, char, charoff, span, valign, width none This is used to control a group of table columms.
dd Definition Description
(Dfn. List)
Block No none This is used to contain the description of a defined term.
del Deleted Text Block No none cite, datetime none This is used to contain text that is officially deleted, but still is included for historical purposes.
Inline
dfn Definition Inline No none This is used to contain an inline definition.
div Division Block No none This is used to divide the content up into chunks.
dl Definition List
(Dfn. List)
Block No none This is used to create a list of definitions.
dt Definition Term
(Dfn. List)
Block No none This is used to contain a term to be defined.
em Emphasize Inline No none This is used to emphasize text.
fieldset Field Set
(Form)
Block No none This is used to organize a form into sections.
form Form
(Form)
Block No action accept, accept-charset, enctype, method, name, onreset, onsubmit none This is used to create a form.
h1 Header Level 1 Block No none These are used to give headings to different sections of a webpage.
h2 Header Level 2
h3 Header Level 3
h4 Header Level 4
h5 Header Level 5
h6 Header Level 6
head Head Other No none profile Core
Events
This is used to contain elements that hold extra data about the webpage.
hr Horizontal Rule Block Yes none This is used to create a horizontal line on the webpage.
html Hypertext Markup Language Root Element Root No none Core
Events
This is the root element of an HTML document.
i Italics Inline No none This is used to put text in italics.
img Image Inline Yes src, alt height, ismap, longdesc, name, usemap, width none This is used to embed an image in the webpage.
input Input
(Form)
Inline Yes none accept, accesskey, alt, checked, disabled, ismap, maxlength, name, onblur, onchange, onfocus, onselect, readonly, size, src, tabindex, type, usemap, value none This is used to create a field with which the user can input information.
ins Inserted Block No none cite, datetime none This is used to denote text that has been inserted into the document.
Inline
kbd Keyboard Text Inline No none This indicates text that is to be typed by the user.
label Label
(Form)
Inline No none accesskey, for, onblur, onfocus none This element contains labels for form fields.
legend Legend
(Form)
Inline No none accesskey none This element is used to create a caption for fieldset
li List Item
(Item List)
Block No none This element is used to create list items, which go into ordered or unordered lists.
link Link Head Yes none charset, href, hreflang, media, rel, rev, type none This element links the page with another document, creating a relationship between the two.
map Image Map Invisible No id name none This creates an image map, which is a picture with clickable regions. The id attribute allows an image to refer to it, and it contains area elements to define those regions.
meta Meta Data Head Yes content http-equiv, name, scheme Core
Events
Meta data is information about your website. This element communicates not only with the browser, but with the server as well.
noscript Noscript Block No none This is used for browsers that don't support a client-side script, such as JavaScript or VBScript.
object Object Block No none archive, classid, codebase, codetype, data, declare, height, name, standby, tabindex, type, usemap, width none This is used to embed an object, such as a Java appelette, Flash movie, or other multimedia.
ol Ordered List
(Item List)
Block No none This creates an ordered list, a list in which things are presented in a specific sequence.
optgroup Option Group
(Form)
Other No label disabled none This creates a group of options in a selection list (which works as a drop-down menu.)
option Option
(Form)
Other No none disabled, label, selected, value none This creates an option in a selection list.
p Paragraph Block No none This is used to create paragraphs. It is probably the most common element in the HTML document body.
param Parameter
(Object)
Invisible Yes name id, type, value, valuetype Events
Core
Language
This sets the run-time parameters for an embedded object
pre Preformatted Text Block No none This element contains text with the whitespace and line breaks preserved.
q Quotation Inline No none cite none This is used to contain a short quotation, usually less than a sentance. In many browsers, The content is put inside quotation marks.
samp Sample Inline No none This indicates that its contents are a sample of computer code.
script Script Head No type charset, defer, src none This contains script of some type, which controls how your webpage behaves. The most common is JavaScript. This can be used in either the Head or Body of the document.
Other
select Select
(Form)
Block No none disabled, multiple, name, onblur, onchange, onfocus, size, tabindex none This is used in forms, so that you can select items from a dropdown list.
small Small Inline No none This renders smaller text. Its function has been passed over to stylesheets, but it is not deprecated.
span Span Inline No none This element controls a span of text within a block element.
strong Strong Inline No none This is to make certain words stand out from others, like keywords.
style Style Head No type media, title Events
Core
This is used to contain an internal stylesheet, also known as an embedded stylesheet.
sub Subscript Inline No none This element contains subscript text, such as that used in chemical forumlas (H2SO4, also known as Sulphuric Acid)
sup Superscript Inline No none This is used for superscript text, as seen in the name McDonald.
table Table
(Table)
Block No none border, cellpadding, cellspacing, frame, rules, summary, width none This creates a table on the webpage.
tbody Table Body
(Table)
Block No none align, char, charoff, valign none This is the body of the table, where most of the data goes.
td Table Data Cell
(Table)
Block No none abbr, align, axis, char, charoff, colspan, headers, rowspan, scope, valign none This contains individual packets of data in a table.
textarea Text Area Block No cols, rows disabled, name, readonly none This creates a text box in a page where a message can be typed.
tfoot Table Foot
(Table)
Block No none align, char, charoff, valign none The table foot contains info at the bottom of the table. It must directly follow the table head, and be followed by the table body, despite the table body appearing to be before the table footer.
th Table Header Cell
(Table)
Block No none abbr, align, axis, char, charoff, colspan, headers, rowspan, scope, valign none The Table Header cell is used to create column headers. The ID attribute also helps text-only browsers to make sense of the tables.
thead Table Header
(Table)
Block No none align, char, charoff, valign none The Table Head contains the column headers of a table.
title Title Head No none Events Core This creates a title in the web browser titlebar.
tr Table Row
(Table)
Block No none align, char, charoff, valign none This arranges data and header cells into rows in a table.
tt Teletype Text Inline No none This defines its contents as teletyped or monospaced text.
ul Unordered List
(Item List)
Block No none This element creates an unordered list, in which the items are in no particular order.
var Variable Inline No none This element means that its contents are an example of a variable.

Deprecated (X)HTML Elements

Name Element
(Element Group)
Block, Head, Inline, Invisible, Other Empty? Attributes Description
Required Implied Forbidden

These elements are valid as HTML 4.01/XHTML 1.0 Transitional or Frameset. These elements have had their functions subsumed by other elements and/or stylesheets, or will be discarded altogether.

applet Applet Block No height, width align, alt, archive, code, codebase, hspace, name, object, vspace Language
Script
This is used to put a Java applet into an HTML document. This function has been absorbed by the object element.
basefont Base Font Block No none color, face, size Events This is the block-level version of the font element. Its role has been absorbed by stylesheets.
center Center Block No none This centered its text horizontally. It has been completely replaced by CSS.
dir Directory
(Item List)
Block No none compact none This creates a directory listing, which is an item list indistinguishable from an unordered list. The unordered list has taken over its role.
font Font Inline No none color, face, size Events The font tag controls the text within it, setting size, color, and font face. It has been completely replaced by stylesheets.
iframe Inline Frame Block No none align, frameborder, height, longdesc, marginheight, marginwidth, name, scrolling, src, width Language
Events
An inline frame displays a subwindow within a page. This allows you to show a document within a document, and works like a client-side include.
isindex IS Index Block Yes none prompt Events This element creates a single-line input field where you could type in keywords to search for.
menu Menu
(Item List)
Block No none compact none The menu is a type of item list that creates a menu of items. This has been absorbed by the unordered list.
s Strikethrough Inline No none Strikethrough text usually means text that has been "deleted." This has been taken over by the del element and stylesheets.
strike
u Underline Inline No none This element underlines its contents. It has been replaced by stylesheets.

Frameset Elements

Name Element
(Element Group)
Block, Head, Inline, Invisible, Other Empty? Attributes Description
Required Implied Forbidden

These elements are valid as HTML 4.01/XHTML 1.0 Frameset. Currently, there is work being done to replace (X)HTML Frames.

frame Frame Other Yes none frameborder, longdesc, marginheight, marginwidth, name, noresize, onload, onunload, scrolling, src Events The frame element defines a frame (subwindow) used in a frameset.
frameset Frameset Other No none rows, cols none This element organizes frames and nested framesets into columns or rows.
noframes No Frames Other No none This is a fallback for framesets. If a browser doesn't support frames, it will show the contents of this element instead.

Obsolete HTML Elements

Name Element
(Element Group)
Block, Head, Inline, Other Empty Description
Obsolete elements have been removed from the HTML specification entirely. Their use is highly discouraged.
comment Comment Invisible No This allowed for certain sections of the webpage to be ignored. The current element is <!-- -->, which is found at the start of the "Current Elements" table.
listing Listing Block No This allowed a list to be created by preserving the whitespace of its contents. This task is done by the pre element alone.
plaintext Plain Text Block No This element renders all HTML in it as plain text including its own end tag—in short, there's no way to stop its effect. In XHTML, it ends at its end tag.
xmp XMP Block No This element rendered text as preformatted text, but also rendered HTML contained within as plain text. Unlike the plaintext element, this did not include its own end tag.