Computers & ProgrammingHTML/XHTMLWeb Development

HTML / XHTML Elements and DTD

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.

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

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top