Elements are the core of an HTML document. Here is a complete listing of elements from the HTML/XHTML modern specifications.
Some of the elements listed below have been deprecated and are not included in the HTML / XTHML specification. Depending on the HTML/XHTML Doctype (DTD – Strict, Transitional, or Frameset), some elements may or may not be supported.
It is recommended that you do not use HTML elements that are deprecated because they may become obsolete in future versions of browsers. Developing your pages in XHTML with a strict Doctype will ensure the most compatibility across browsers.
Element | Description | HTML 4.01 / XHTML 1.0 | XHTML 1.1 | HTML 5 |
---|---|---|---|---|
<!--...--> | Defines a comment. | STF | Yes | Yes |
<!DOCTYPE> | Defines the document type. | STF | Yes | Yes |
<a> | Defines an anchor/link. | STF | Yes | Yes |
<abbr> | Defines an abbreviation. | STF | Yes | Yes |
<acronym> | Defines an acronym. | STF | Yes | No |
<address> | Defines contact information for the author of a document. | STF | Yes | Yes |
<applet> | Deprecated. Defines an embedded applet. | TF | No | No |
<area /> | Defines an area inside an image map. | STF | No | Yes |
<article> | Specifies independent, self-contained content. | No | No | Yes |
<aside> | For content aside from the content it is placed in. | No | No | Yes |
<audio> | Multimedia content, sounds, music, or other audio streams. | No | No | Yes |
<b> | Defines bold text. | STF | Yes | Yes |
<base /> | Specifies the base URL/target for all relative URLs in a document. | STF | Yes | Yes |
<basefont /> | Deprecated. Sets a default color, size, or font for the text in a doc. | TF | No | No |
<bdi> | Text that should not be bound to the text direction of its parent elements. | No | No | Yes |
<bdo> | Overrides the current text direction. | STF | No | Yes |
<big> | Defines big text. | STF | Yes | No |
<blockquote> | Defines a long quotation. | STF | Yes | Yes |
<body> | Defines the document’s body. | STF | Yes | Yes |
<br /> | Defines a line break. | STF | Yes | Yes |
<button> | Defines a button. | STF | Yes | Yes |
<canvas> | For making graphics with a script. | No | No | Yes |
<caption> | Defines a table caption. | STF | Yes | Yes |
<center> | Deprecated. Defines centered text. | TF | No | No |
<cite> | Defines a citation. | STF | Yes | Yes |
<code> | Defines code. | STF | Yes | Yes |
<col /> | Defines attribute values for one or more columns in a table. | STF | No | Yes |
<colgroup> | Specifies a group of one or more columns in a table for formatting. | STF | No | Yes |
<command> | A button, or a radiobutton, or a checkbox. | No | No | Yes |
<datalist> | A list of options for input values. | No | No | Yes |
<dd> | Defines a description of an item in a definition list. | STF | Yes | Yes |
<del> | Defines text that has been deleted from a document. | STF | Yes | Yes |
<details> | For describing details about a document, or parts of a document. | No | No | Yes |
<dfn> | Defines a definition term. | STF | Yes | Yes |
<dir> | Deprecated. Defines a directory list. | TF | No | No |
<div> | Defines a section in a document. | STF | Yes | Yes |
<dl> | Defines a definition list. | STF | Yes | Yes |
<dt> | Defines a term in a definition list. | STF | Yes | Yes |
<em> | Defines emphasized text. | STF | Yes | Yes |
<embed> | Embedded content, such as a plug-in. | No | No | Yes |
<fieldset> | Groups-related elements in a form. | STF | Yes | Yes |
<figcaption> | The caption of the figure section. | No | No | Yes |
<figure> | Grouping a section of stand-alone content. | No | No | Yes |
<font> | Deprecated. Defines font, color, and size for text. | TF | No | No |
<footer> | Footer of a document or section. | No | No | Yes |
<form> | Defines a form for input. | STF | Yes | Yes |
<frame /> | Defines a frame in a frameset. | F | No | No |
<frameset> | Defines a set of frames. | F | No | No |
<h1> to <h6> | Defines headings. | STF | Yes | Yes |
<head> | Defines information about the document. | STF | Yes | Yes |
<header> | Introduction of a document or section. | No | No | Yes |
<hgroup> | For a section of headings. | No | No | Yes |
<hr /> | Defines a horizontal line. | STF | Yes | Yes |
<html> | Defines the root of an HTML document. | STF | Yes | Yes |
<i> | Defines italic text. | STF | Yes | Yes |
<iframe> | Defines an inline frame. | TF | No | Yes |
<img /> | Defines an image. | STF | Yes | Yes |
<input /> | Defines an input control. | STF | Yes | Yes |
<ins> | Defines text that has been inserted into a document. | STF | Yes | Yes |
<isindex> | Deprecated. Adds a search field. | No | No | No |
<keygen> | Generate keys to authenticate users. | No | No | Yes |
<kbd> | Defines keyboard input. | STF | Yes | Yes |
<label> | Defines a label for an <input> element. | STF | Yes | Yes |
<legend> | Defines a caption for a <fieldset> element. | STF | Yes | Yes |
<li> | Defines a list item. | STF | Yes | Yes |
<link /> | Relationship between a document and an external resource. | STF | Yes | Yes |
<map> | Defines a client-side image map. | STF | No | Yes |
<mark> | Text that should be highlighted. | No | No | Yes |
<menu> | Deprecated. Defines a menu list. | TF | No | Yes |
<meta /> | Defines metadata about an HTML document. | STF | Yes | Yes |
<meter> | For a measurement. | No | No | Yes |
<nav> | A section of navigation. | No | No | Yes |
<noframes> | Defines alternate content for users that do not support frames. | TF | No | No |
<noscript> | Alternate content for users that do not support client-side scripts. | STF | Yes | Yes |
<object> | Defines an embedded object. | STF | Yes | Yes |
<ol> | Defines an ordered list. | STF | Yes | Yes |
<optgroup> | Defines a group of related options in a dropdown list. | STF | Yes | Yes |
<option> | Defines an option in a dropdown list. | STF | Yes | Yes |
<output> | Different types of output. | No | No | Yes |
<p> | Defines a paragraph. | STF | Yes | Yes |
<param /> | Defines a parameter for an object. | STF | Yes | Yes |
<pre> | Defines preformatted text. | STF | Yes | Yes |
<progress> | State of a work in progress. | No | No | Yes |
<q> | Defines a short quotation. | STF | Yes | Yes |
<rp> | Alternate information for nonsupport of the ruby element. | No | No | Yes |
<rt> | Explanation of the ruby annotation. | No | No | Yes |
<ruby> | Ruby annotation. | No | No | Yes |
<s> | Deprecated. Defines strikethrough text. | TF | No | Yes |
<samp> | Defines sample output from a computer program. | STF | Yes | Yes |
<script> | Defines a client-side script. | STF | Yes | Yes |
<section> | Section in a document. | No | No | Yes |
<select> | Defines a dropdown list. | STF | Yes | Yes |
<small> | Defines smaller text. | STF | Yes | Yes |
<source> | Media resources for media elements. | No | No | Yes |
<span> | Defines a section in a document. | STF | Yes | Yes |
<strike> | Deprecated. Defines strikethrough text. | TF | No | No |
<strong> | Defines strong text. | STF | Yes | Yes |
<style> | Defines style information for a document. | STF | Yes | Yes |
<sub> | Defines subscripted text. | STF | Yes | Yes |
<summary> | Caption inside the details element. | No | No | Yes |
<sup> | Defines superscripted text. | STF | Yes | Yes |
<table> | Defines a table. | STF | Yes | Yes |
<tbody> | Groups the body content in a table. | STF | No | Yes |
<td> | Defines a cell in a table. | STF | Yes | Yes |
<textarea> | Defines a multiline input control (text area). | STF | Yes | Yes |
<tfoot> | Groups the footer content in a table. | STF | No | Yes |
<th> | Defines a header cell in a table. | STF | Yes | Yes |
<thead> | Groups the header content in a table. | STF | No | Yes |
<time> | Defining a time and/or a date. | No | No | Yes |
<title> | Defines a title for the document. | STF | Yes | Yes |
<tr> | Defines a row in a table. | STF | Yes | Yes |
<track> | Tracks used in media players. | No | No | Yes |
<tt> | Defines teletype text. | STF | Yes | No |
<u> | Deprecated. Defines underlined text. Different element in HTML5. | TF | No | Yes |
<ul> | Defines an unordered list. | STF | Yes | Yes |
<var> | Defines a variable. | STF | Yes | Yes |
<video> | Video content. | No | No | Yes |
<wbr> | Word break. | No | No | Yes |