HTML Elements
Summary
Index page for HTML elements.
- !DOCTYPE
- A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document (for example, a webpage) with a Document Type Definition (DTD) (for example, the formal definition of a particular version of HTML). In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax. Not including <!DOCTYPE> may trigger Quirks mode.
- a
- Defines a hyperlink, a destination of hyperlink, or both.
- acronym
- This element is deprecated in HTML5, in favor of the abbr element. It should no longer be used.
The
acronym
element indicated an abbreviation or a word formed by the initial letter or letters (or major parts) of a compound term, like NATO, radar or Interpol. - address
- The address element (<address>) encloses contact information of the owner or the author of the document or the article.
- applet – obsolete
- The applet element (<applet>) embeds a Java applet into a web page.
- area
- Represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map.
- article
- The article element (<article>) defines a self-contained composition within a page.
- aside
- The aside element (<aside>) indicates content that is only tangentially related to the rest of the content.
- audio
- The audio element (<audio>) is used for playing audio files and may display a minimal media player user interface.
- b
- The b element represents a span of text to be stylistically offset from the normal prose without conveying any extra importance.
- base
- The base element is used to specify a document’s base URL and base target that is used for resolving URI references (relative URLs) within the document.
- basefont
- The
basefont
element (<basefont>
) allows specifying a defaultcolor
andfont-size
for text on the entire page. Thebasefont
element was deprecated in HTML4 and should no longer be used. - bdo
- The bdo element (<bdo>) allows you to specify the direction in which text is to be rendered on the page. (“BDO” stands for Bi-Directional Override.)
- bgSound
- The bgsound element (
<bgsound>
) instructs the browser to load and play a sound file while the user is on that page. Don’t use it. Use the audio element instead. - big
- The big element (<big>) indicates that the enclosed text should be display in a larger font size than surrounding text. This element is considered obsolete in HTML5. Use CSS instead.
- blockquote
- The blockquote element indicates an extended quotation.
- body
- The body element (<body>) represents the main content of the document.
- br
- The line break element, br, forces the current line of text to end and the text that follows it will being on a new line.
- button
- The button element represents a clickable button.
- canvas
- The canvas element (<canvas>) provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, or other visual images on the fly, by using the associated canvas API.
- caption
- The caption (<caption>) element represents the title of the table that is its parent.
- center
- The
<center>
element center-aligns text in an HTML page. The element is deprecated in HTML 4.01 and obsolete in HTML5. Use CSS instead. - cite
- The cite element represents a reference to a creative work.
- code
- The code element specifies a fragment of computer code.
- col
- The col element (<col>) specifies properties for each column within a <colgroup> element in a <table>.
- colgroup
- The colgroup element (<colgroup>) specifies a group of one or more columns in a table for formatting. This element is useful for applying properties to entire columns, instead of repeating the properties for each cell, for each row.
- custom
- Represents a user-defined HTML tag (nonstandard)
- datalist
- The datalist element (<datalist>) represents a set of <option> elements that represent predefined options for other controls. It may be associated with an <input> element by adding a list attribute to the input element.
- dd – description list data
- The dd element represents the description, definition, or value, part of a term-description group in a definition list (dl). A dt (topic) is usually followed by one or more dd (definition) elements. Several consecutive dt are attributed to the dd element that immediately follows the group.
- del
- The del element indicates text that has been deleted from the document.
- dfn
- The dfn element indicates the defining instance of a term.
- dir
- The dir element
<dir>
is used to list directory titles. The dir element is deprecated in HTML 4.01, and obsolete in HTML5. Use CSS and the ul element instead. - div
- The div element (<div>) is a generic block-level container that has no semantic value other than the one that you give it via
id
orclass
attributes. It can be used for a variety of purposes including the styling of common elements, or for grouping elements with common attributes. - dl – description list
- The dl element is used to define a description list. The element encloses one or more description terms, enclosed in dt elements, and description definitions (definitions of the terms), enclosed within dd elements.
- dt – description list topic
- The dt element indicates a definition term within a definition list (dl). A dt (topic) is usually followed by one or more dd (definition) elements. Several consecutive dt are attributed to the dd element that immediately follows the group.
- em
- The em element indicates text that has emphasis.
- EMBED
- The HTML <embed> Element represents an integration point for an external content- typically, non-HTML content such as an application or some other type of interactive content which involves use of a third-party plugin as a handler (rather than being natively supported by the UA).
- fieldset
- The fieldset element is used to group related fields within a form.
- figcaption
- The figcaption (<figcaption>) defines a caption or legend for a figure element. This element is new in HTML5.
- figure
- The figure element (<figure>) represents self-contained content (such as an image), optionally with a caption, that can be referenced as a single unit from the main content of the document.
- font
- The font element is an obsolete tag that was used to specify the typeface, size, and color of the text it contained.
- footer
- The footer element (<footer>) represents content of the end of the nearest ancestor sectioning content or sectioning root element.
- form
- The form element (<form>) defines an HTML form for user input, subsequently to be submitted to a website or service.
- frame
- The frame element (<frame>) defines one particular window (frame) within a <frameSet>. The <frame> element is obsolete in HTML5.
- frameSet
- The frameset element (<frameset>) defines a collection of frames. The <frameset> element holds one or more <frame> elements. Each <frame> element can hold a separate document. The <frameset> tag is obsolete in HTML5.
- head
- The head element (<head>) represents a collection of metadata for the document.
- header
- The header element (<header>) represents the header of a section: a group of introductory or navigational aids.
- hgroup
- (Obsolete) The hgroup element (<hgroup>) is typically used to group a set of one or more h1-h6 elements — to group, for example, a section title and an accompanying subtitle. The hgroup element (<hgroup>) element is obsolete in HTML5.
- hn
- The h1 through h6 elements define levels of headings within a document.
- hr
- The hr element represents a paragraph-level thematic break in text.
- html
- The html element (<html>) represents the root of an HTML document. The <html> tag is the container for all other HTML elements; except for the <!DOCTYPE> tag.
- html comment data-type
- A syntactical production: The comment syntax indicates text within a document that is not displayed on the rendered page in the browser.
A comment starts with
<!--
and ends with-->
. - i
- The i element indicates that the contained text is in an alternate voice, mood, or language from the surrounding text.
- iframe
- The iframe element (<iframe>) introduces a new nested browsing context.
img
:
- input
- The input element (<input/>) is a multipurpose element for representing form widgets. The type of widget depends on the
type
attribute. - input type ‘button’
- The button type of the input element represents a button with no default behavior. Compare with the button element which offers default behaviours with via attributes.
- checkbox
- The checkbox type of the <input> element represents a state or option that can be toggled.
- color
- The color type of the <input> element provides a widget for selecting a color value.
- date
- The date type of the <input> element represents a widget for specifying a date value (year, month, day), with no time zone or time information.
- datetime-local
- The datetime-local type of the <input> element represents a widget for setting a date-time value (year, month, day, hours, minutes, seconds, milliseconds) with no time zone information.
- input type ‘email’
- The email type of the <input> element represents a field for entering an e-mail address.
- file
- The file type of the <input> element represents widget for specifying a file.
- hidden
- The hidden type of the <input> element represents a value that is hidden from the user, but which is sent with the form data; the value can be set programatically.
- image
- The image type of the <input> element represents an image. The user can either use the image as a button to submit the form, or select a coordinate of the image to be submitted with the form data.
- month
- The month of the <input> element represents a widget for entering a month value.
- number
- The number type of the <input> element represents a widget for entering a number.
- password
- The password type of the <input> element represents a one-line plain-text edit control for entering a password, which renders input text in such a way as to hide the characters (e.g., a series of asterisks).
- radio
- The radio type of the <input> element represents a radio button control.
- range
- An input field for setting a number value that falls in a given range.
- reset
- An input form button that resets the form to default values.
- search
- An input text field that is used for search queries.
- submit
- An input form button that submits the form data to the server.
- tel
- An input field intended for entering a telephone number; does not enforce any syntax.
- text
- The input element with a type attribute whose value is “text” represents a one-line plain text edit control for the input element’s value.
- time
- An input field for entering a specific time value.
- url
- An input field for entering a single, absolute URL value.
- week
- An input field for entering a value that represents a specific week.
- ins
- The ins element represents a range of text that has been inserted (added) into a document.
- isIndex
- (Obsolete) A special-purpose single-line text input field
- kbd
- The 'kbd element denotes user input. Typically this is keyboard input (hence “kbd”), but it may also be used to represent other user input, e.g. voice commands or gestures.
- label
- Specifies a label for another element on the page.
- legend
- The legend element represents a title or explanatory caption for the contents of its parent fieldset element.
- li – list item
- The li element represents one list item.
- link
- Enables the current document to establish links to external documents.
- listing
- (Obsolete) Renders text of the element (usually in monospace font) without interpreting contain HTML markup; obsoleted by pre and code elements.
- main
- Represents the main content of the body of a document or application.
- map
- Contains coordinate data for client-side image maps.
- mark
- Represents a run of text that is contextually-important for some reason, such as text that has been marked or highlighted.
- marquee
- Nonstandard. Defines a scrolling area (usually horizontal) of text.
- media
- Presents audio or video data to the user. The media element provides the audio and video objects which are used to play sound and video content.
- menu
- The menu element represents information as a list of items or commands.
- meta
- The <meta> element embeds various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.
- meter
- The HTML
<meter>
element represents a value within a specified range. This value can be any real number. - nav
- The HTML Navigation Element (<nav>) represents a section of navigation links: a page that links to other pages, or to parts within the page
- nextID
- An identifier, automatically generated by the early NeXT web editor.
- noBR
- Indicates that the enclosed text should not be broken across lines; use the CSS property white-space instead.
- noFrames
- Recognized as a deprecated element. Intended to provide content for browsers that cannot, or are configured not to, display frames.
- noscript
- The HTML NoScript Element (<noscript>) defines a section of html to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.
- object
- The <object> element represents can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin.
- ol – ordered list
- The ol element is used to define an ordered list. The element encloses one or more list items, enclosed in li elements.
- optgroup
- Allows authors to group choices logically in a select element.
- option
- Denotes one choice in a select element.
- p
- The p (for paragraph) element (<p>) represents a paragraph.
- param
- This element defines parameters for plugins invoked by object elements.
- picture
- Control which image resource a user agent presents to a user, based on media query and/or support for a particular image format.
- plainText
- The plaintext element (<plaintext>) is a deprecated tag that was used to indicate that the contents should be interpretted as raw text, without parsing any HTML entities or child tags.
- pre
- The pre tag defines preformatted text. Text in a pre element is displayed in a fixed-width font and preserves both spaces and line breaks.
- progress
- The HTML
<progress>
element represents the completion progress of a task. - q – quote
- The q element represents some phrasing content quoted from another source.
- rt
- The rt element marks the ruby text component of a ruby annotation.
- ruby
- The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations.
- s – strikethrough
- The s element represents contents that are no longer accurate and must be marked accordingly in order to allow keeping it in the document.
- samp
- The samp element represents output from a program or computing system.
- script
- The script element enables dynamic script and data blocks to be included in documents. It can contain code/data directly or it can link to external sources. It is mainly used with JavaScript.
- section
- Defines sections in a document, such as chapters, headers, footers, or any other sections of the document. It is new to HTML5.
- select
- The
select
element is used to create a drop-down list. Used withoption
tags inside theselect
element to define the available options in the list. - small
- Presentational-only element to define text that will appear small. Used for fine print.
- source
- Allows developer to specify multiple alternative media resources for media elements, such as
<video>
and<audio>
. It does not represent anything on its own, and is used withsrc
attribute to specify the URL. - span
- Groups inline elements in a document. The span element is both style and semantics neutral; it does not assign any style attributes or semantic meaning on its own.
- strike
- Deprecated presentational element defining strikethrough text. It is deprecated in HTML4 and not supported in HTML5. Consider the del or s elements instead.
- strong
- The strong element indicates text that is of great importance, seriousness, or urgency.
- style
- Defines style information for an HTML document. Inside the
style
element you specify how HTML elements should render in a browser. Each HTML document can contain multiplestyle
tags. - sub
- Defines subscript text. Subscript text appears half a character below the baseline.
- sup
- Defines superscript text. Superscript text appears half a character above the baseline.
- table
- The
<table>
element is a wrapper for an HTML table. It defines the start and end of a table, and can contain other table elements, such as<tr>
. - tbody
- The
tbody
tag is used to group the body content in an HTML table. - td
- Defines a standard Cell in an HTML table.
- textarea
- The
textarea
tag defines a multi-line text input control. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier). - tfoot
- The
tfoot
tag is used to group footer content in an HTML table. - th
- The
th
tag defines a header cell in an HTML table. - thead
- The thead element (<thead>) identifies header rows at the top of a table, usually containing column labels. It may contain one or more rows of <th> or <td> cells.
- time
- The
time
tag defines either a time (24 hour clock), or a date in the Gregorian calendar, optionally with a time and a time-zone offset. It does not render differently in any of the major browsers. This element can be used as a way to encode dates and times in a machine-readable way so that, for example, user agents can offer to add birthday reminders or scheduled events to the user’s calendar. - title
- Defines the
title
of the current document. - tr
- The
tr
element represents a row of cells in a table. - track
- The
track
tag specifies text tracks for media elements (audio and video). This element is used to specify subtitles, caption files or other files containing text, that should be visible when the media is playing.Track
is new to HTML5 and is not yet supported in any major browser. - tt
- The teletype element (
<tt>
) creates monospaced text. It’s use is deprecated in favour of semantic elements like<code>
and CSS styles. However, the tt element is still widely supported in browsers. - u
- Underlines text inline. Deprecated in HTML4, redefined in HTML5. In HTML5 it is used to express “an unarticulated, though explicitly rendered, non-textual annotation,” such as a proper name in Chinese or a spelling error.
- ul – unordered list
- The ul element is used to define an unordered list. The element encloses one or more list items, enclosed in li elements.
- var
- Defines a variable.
- video
- The
video
tag represents an embedded video - wbr
- The Word Break Opportunity (
wbr
) element represents a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location. - xml
- Defines a simple XML data that can be embedded directly in an HTML page.
- xmp
- (Obsolete) Renders text between the start and end tags without interpreting the HTML in between and using a monospaced font. Non-conforming in HTML5. Use
code
orpre
instead.
See also
Related articles
HTML
HTML Elements
This is the list of HTML and related Elements from the past to the present.
The root element
Document metadata
Scripting
Sections
Grouping content
Text-level semantics
- a
- abbr
- acronym
- b
- basefont
- bdo
- big
- blink
- br
- cite
- code
- dfn
- em
- font
- i
- kbd
- listing
- mark
- marquee
- nextid
- nobr
- q
- rp
- rt
- ruby
- s
- samp
- small
- spacer
- span
- strike
- strong
- sub, sup
- time
- tt
- u
- var
- wbr
- xmp
Edits
Embedded content
- applet
- area
- audio
- bgsound
- canvas
- embed
- frame
- frameset
- img
- iframe
- map
- math
- noframes
- noembed
- object
- param
- picture
- plaintext
- source
- svg
- track
- video
Tables
Forms
- form
- fieldset
- legend
- label
- input
- button
- select
- datalist
- optgroup
- option
- textarea
- keygen
- output
- progress
- meter
Interactive
Previous HTML Elements
- acronym
- applet (deprecated in HTML 4.01, non conformant in HTML5)
- basefont (deprecated in HTML 4.01, non conformant in HTML5)
- bgsound
- big
- blink
- c (never deployed, was a proposal before span)
- center (deprecated in HTML 4.01, non conformant in HTML5)
- font (deprecated in HTML 4.01, non conformant in HTML5)
- frame
- frameset
- isindex (deprecated in HTML 4.01, non conformant in HTML5)
- listing
- marquee
- nextid
- nobr
- noembed
- noframes
- plaintext
- spacer
- strike (deprecated in HTML 4.01, non conformant in HTML5)
- tt
- u (deprecated in HTML 4.01, non conformant in HTML5)
- xmp