HTML element reference

This page lists all uses label Created HTML element They have been grouped by function to make it easier for you to find what you want. At the same time, all elements are listed in alphabetical order in the sidebar.

For more basic information about HTML elements and attributes, please refer to HTML introduction In this paper.

Taproot element

element describe
<html> HTML  <html> Elements Represents the root (top level element) of an HTML document, so it is also called Root element All other elements must be descendants of this element.

document metadata

Metadata contains the relevant information of the page, including style, script and data, which can help some software (e.g Search Engines browser Better use and render the page. Metadata for styles and scripts can be defined directly in web pages or linked to external files containing relevant information.

element describe
<base> HTML < base > element Specifies the root URL to use for all relative URLs contained in a document. There can be only one < base > element in a copy.
<head> HTML head element Specify document related configuration information (metadata), including document title, referenced document style and script, etc.
<link> HTML external resource link element ( <link> )Specifies the relationship between the current document and external resources. This element is most commonly used for linking style sheet In addition, it can also be used to create site icons (such as the "favicon" icon on the PC side and the icon on the mobile device for display on the home screen).
<meta> HTML <meta> element Represents elements that cannot be meta related by other HTML elements(( base link , script style or title )Any metadata information represented by.
<style> < style > elements of HTML Contains the style information or part of the document. By default, the style information for this label is usually CSS Format.
<title> HTML <title> element Defines the title of the document, which is displayed on the title bar or tab of the browser. It should only contain text, and if it does, any tags it contains will be ignored.

Partition root element

element describe
<body> HTML body element Represents the content of a document. document.body Property provides scripts that can easily access the body element of a document.

Content partitioning

The content partitioning element allows you to logically organize the content of a document. Use partitioning elements such as header, footer, NAV, and header (H1 ~ H6) to create a clear outline for the content of the page, so as to distinguish the content of each chapter.

element describe
<address> HTML <address> element Indicates that the HTML in it provides contact information for a person or organization (etc.).
<article> HTML <article> The element represents a stand-alone structure in a document, page, application, or web site. It is intended to be an independently distributable or reusable structure. For example, in a publication, it may be a forum post, a magazine or news article, a blog, a user submitted comment, an interactive component, or other independent content items. ​​
<aside> HTML <aside> element Represents a part that is almost unrelated to the rest of the page content, is considered to be independent of the content and can be split separately without affecting the whole.
<footer> HTML < footer > element Indicates the last one Chapter content perhaps Root node The (sectioning root) element. A page header usually contains information about the author of the chapter, copyright data, or links related to the document.
<header> HTML <header> element Used to present introductory content, usually containing a set of introductory or practical elements that aid navigation. It may contain some title elements, but it may also contain other elements, such as logo, search box, author name, and so on.
<h1> (en-US) , <h2> (en-US) , <h3> (en-US) , <h4> (en-US) , <h5> (en-US) , <h6> (en-US) HTML <h1> <h6> Heading element It presents six different levels of titles, <h1> The highest level, and <h6> The lowest level.
<main> HTML <main> element The body Or the main part of the application. The main part is composed of the content directly related to the document or extended to the central theme of the document and the main function part of the application.
<nav> HTML <nav> element Represents a part of a page whose purpose is to provide navigation links in the current document or other documents. Common examples of the navigation section are menus, contents, and indexes.
<section> HTML < section > elements Represents an independent part contained in an HTML document. It has no more specific semantic elements to represent it. Generally speaking, it contains a title.

Text content

Use HTML text content elements to organize open tags <body> And closed label </body> The content of a block or chapter in. These elements identify the purpose or structure of the content, which is accessibility and SEO Very important.

element describe
<blockquote> HTML <blockquote> element (or HTML block level reference element), which represents that the text in it is the reference content. Usually when rendering, this part of the content will have a certain indentation( notes How to change it is described in. If the citation comes from the network, you can set the URL address of the source of the original content to the cite feature. If you want to inform the reader of the source of the citation in the form of text, you can use the cite Element.
<dd> HTML <dd> Elements HTML description element )Used to indicate a list of descriptions( dl )The description of a term in the element. This element can only appear as a child of the description list element, and must be followed by one dt Element.
<div> HTML <div> element (or HTML document partition elements )Is a generic streaming content container that has no impact on content or layout without CSS.
<dl> HTML <dl> element (or HTML Description list elements )Is a list of term definitions and descriptions, usually used to present a vocabulary or metadata (a list of key value pairs).
<dt> HTML <dt> element (or HTML term definition elements )Used to declare a term in a list of definitions. This element can only be used as dl The child element of appears. This element is usually followed by dd Elements, however, appear in succession <dt> Elements will be created by the first one that appears after them dd Element definition.  
<figcaption> HTML <figcaption> Elements Is the description / title of the picture associated with it, used to describe its parent node figure Other data in the element. This means that <figcaption> In figure The first or last one in the block. At the same time, the HTML figcaptation element is optional; without this element, the image of the parent node will only have no description / title.
<figure> HTML <figure> element Represents a separate piece of content, often with a caption figcaption As a separate reference unit. When it belongs to the main flow, its location is independent of the subject. This tag is often used to refer to images, illustrations, tables, code snippets, etc. when this part is transferred to the appendix or other pages, it will not affect the main body.
<hr> HTML <hr> Elements Represents the transformation of topics between paragraph level elements (for example, a change in the scene in a story, or a change in the theme of a chapter).
<li> HTML <li> Elements (also called HTML list entry elements) Used to represent an entry in a list. It must be contained in a parent element: a sequential table( ol ), an unordered list( ul )Or a menu( menu )。 In a menu or unordered list, list items are usually displayed in point order; in an ordered list, the list items usually show an ascending count on the left, such as numbers or letters.
<ol> HTML <ol> element Represents an ordered list, usually rendered as a numbered list.
<p> HTML <p> The element (or HTML paragraph element) represents a paragraph of text. This element is usually represented as a block of text separated from adjacent text, either separated by vertical white space or indented with the first line. In addition, < p > is Block level elements
<pre> HTML <pre> Element represents predefined rich text. The text in this element is usually displayed in the form of equal width font according to the arrangement in the original file, and the blank characters (such as spaces and line breaks) in the text will be displayed. (line breaks immediately after the < pre > start tag are also omitted.)
<ul> HTML <ul> element (also called HTML unordered list element) represents an unordered or bulleted list that can contain multiple elements.

Inline text semantics

Use HTML inline text semantics to define the semantics, structure, or style of a word, a line of content, or any text.

element describe
<a> HTML <a> element You can create hyperlinks to other pages, files, locations within the same page, email addresses, or any other URL.
<abbr> HTML abbreviation elements <abbr> )Used to represent abbreviations and can be used with the optional title Property provides a complete description.
<b> HTML bring attention to element( <b> Used to draw the reader's attention to the content of the element (if not highlighted). This element was thought to be Boldface elements And most browsers still display the text in bold. Nevertheless, you should not <b> Element is used to display bold text; an alternative is to use CSS font-weight Property to create bold text.
<bdi>
HTML  Bidirectional isolation element(   <bdi> )The bidirectional algorithm tells the browser to isolate the text it contains from the surrounding text. This function is especially useful when the website inserts some text dynamically and does not know the orientation of the inserted text.
<bdo> HTML bidirectional text substitution elements( <bdo> )It rewrites the directionality of the text,
<br> HTML < br > elements Generates a newline (carriage return) symbol in the text. This element is useful when writing poems and addresses, where line breaks are important.
<cite> HTML citation tag  ( <cite> )Represents a reference to a work and must contain the title of the work. This reference may be an abbreviation for the metadata associated with the reference according to the appropriate context convention.
<code> HTML <code> element Renders a piece of computer code. By default, it is displayed in the browser's default constant width font
<data> HTML <data> element Associate a specified content with a machine-readable translation. However, if the content is time or date related, be sure to use it time
<dfn> HTML definition element  ( <dfn> )Represents a definition of a term.
<em> HTML highlights  ( <em> )Mark the content that needs to be read by users <em> Elements can be nested. The deeper the nesting level is, the more important the contents are considered to be.
<i> HTML Element <i> A series of texts used to represent common text for some reason. For example, technical terms, foreign phrases or the ideological activities of characters in novels are usually shown in italics.
<kbd> HTML keyboard input elements( <kbd> )Used to represent user input, it produces an inline element that is displayed in the browser's default monospace font.
<mark> HTML markup text elements (< mark >) represent text marked or highlighted for reference or symbolic purposes, due to the relevance or importance of the marked paragraph in a closed context.
<q> HTML reference tag ( <q> )This label is used to refer to short text, so please do not introduce line breaks. For long text references, please use blockquote replace.
<rb> HTML Ruby Base <rb> )Elements are used to separate ruby The basic text component of the annotation (that is, the text being annotated). One <rb> The element should wrap each individual atomic segment of the base text.
<rp> HTML <rp> Elements Used for those that cannot be used ruby Element shows the browser for Ruby annotations, providing the following parentheses.
<rt> HTML Ruby text( <rt> )Elements Contains the pronunciation of characters that appear in Ruby annotations to describe the pronunciation of East Asian characters. This element is always in the ruby Element.
<rtc> HTML <rtc> Elements Contains the semantic annotations of the text, which are in the rb Element. rb Elements can have pronunciation( rt )And semantics( rtc )Notes.
<ruby> HTML  <ruby> Elements It is used to display phonetic notation or character annotation of East Asian characters.
<s> HTML <s> Elements Use strikethrough to render text. Use <s> Element to represent something that is no longer relevant or accurate. However, when representing document editing, it is not recommended to use <s> For this reason, it is advocated to use del And ins Element.
<samp> <samp> Element is used to identify the computer program output, usually using the browser's default monotype font (for example, lucida console).
<small> The < small > element in HTML reduces the font size of the text by one size. (for example, from large to medium, from medium to small, from small to super small). In HTML5, in addition to its style meaning, this element is redefined to represent side notes and subsidiary details, including copyright and legal texts.
<span> HTML <span>   Element is a general line content container for phrase content, and has no special semantics. You can use it to group elements to achieve some style intent (by using class or ID attributes), or they have common attributes, such as lang It should be used when there are no other appropriate semantic elements. <span> And div The elements are very similar, but div It's a Block element and <span> then is In line elements .
<strong> Strong element( <strong> )The text is very important and is usually shown in bold.
<sub> HTML <sub> Elements A text area is defined, which, for typography reasons, should be displayed lower and smaller than the main text.
<sup> HTML <sup> Elements A text area is defined. For typesetting reasons, it should be higher and smaller than the main text.
<time>  HTML time Label( <time> )Used to indicate 24-hour time or Gregorian calendar date If it represents a date, it can also include time and time zone.
<u> HTML <u> Element (ambiguous annotation element) Represents an inline text field that needs to be labeled as non textual. By default, it is rendered as a solid line underline, which can be replaced with CSS.
<var> < var > tag Represents the name of the variable, or a value provided by the user.
<wbr> HTML <wbr> Elements - a location in text where the browser can choose to wrap, although its newline rules may not wrap here.

Pictures and multimedia

HTML supports a variety of multimedia resources, such as images, audio and video.

element describe
<area> HTML <area> Element defines a hotspot area on the image, which can be associated with a hyperlink. The < area > element is only used inside the < Map > element.
<audio> HTML <audio>   Element is used to embed audio content in a document.   <audio> The element can contain one or more audio resources that can be used by src Property or source Element: the browser will choose the most appropriate one to use. It can also be used MediaStream Use this element for streaming media.
<img> HTML <img> element Embed an image into the document.
<map> HTML <map> attribute And area Attributes are used together to define an image map (a clickable link area)
<track> HTML <track> element Treated as a media element - audio and video To use. It allows you to specify sequential text captions (or time-based data), such as automatically processing captions. Subtitle formats are Webvtt format .vtt Format file) - web video text subtitle format, and Temporal Text Markup Language (ttml) Format.
<video> HTML <video> element It is used to embed media player in HTML or XHTML documents to support video playback within documents.

Embedded content

In addition to regular multimedia content, HTML can include a variety of other content, even if it is not easy to interact.

element describe
<embed> HTML <embed> element Embeds external content in the document at a specified location. This content is provided by external applications or other interactive content sources, such as browser plug-ins.
<iframe> browsing context
<object>
HTML <object> element (or called HTML embedded object elements )Indicates the introduction of an external resource, which may be an image, an embedded browsing context, or a resource used by a plug-in.
<param> HTML < param > element by object Element definition parameters
<picture> HTML <picture> element By including zero or more source Element and a img Element to provide image versions for different display / device scenes. The browser selects the most matching child <source> Element, if there is no match, select <img> Elemental src Property. The selected image is then rendered in the space occupied by the < img > element.
<portal> (en-US)
<source> HTML <source> The elements are picture , audio perhaps video Element specifies multiple media resources. This is an empty element. It is usually used to Multiple formats supported by different browsers Provide the same media content.

script

To create dynamic content and web applications, HTML supports the use of scripting languages, most notably JavaScript. Some elements are used to support this feature.

element describe
<canvas> <canvas> Elements can be used through JavaScript( Canvas API or WebGL API) drawing graphics and graphics animation.
<noscript> If the script type on the page is not supported or the script is currently turned off in the browser, the HTML < noscript > elements Defines the substitution content when the script is not executed.
<script> The element contains Global properties

Edit logo

These elements can indicate the part of a text that has been changed.

element describe
<del> HTML <del> The label represents some text content that has been removed from the document. For example, you can use this tag when you need to display modification records or source code differences. ins Tags do the opposite: they represent what is added to the document.
<ins>
HTML <ins> element Defines the text that has been inserted into the document.

Table content

The elements here are used to create and process table data.

element describe
<caption> HTML <caption> Elements  (or HTML table header element )Show the title of a table, which is often used as a table However, it can also be styled by CSS, so it can also appear in any position relative to the table.
<col> HTML  <col> Elements Defines columns in a table and is used to define common semantics on all common cells. It is usually located in colgroup Element.
<colgroup> Table column group in HTML( Column Group <colgroup> )Tags are used to define a set of lists in a table.
<table> HTML Of table Elements represent tabular data - that is, information represented by a two-dimensional data table.
<tbody> (en-US)
<td> HTML <td> element Defines a table cell that contains data. It participates in the table model .
<tfoot> HTML elements <tfoot> Defines the total row of columns in a set of tables.
<th> HTML <th> element
<thead> HTML Of <thead> The element defines a set of rows that define the column header of a table.
<tr> HTML <tr> Elements Define the rows in the table. The same line can appear at the same time td And th Elements

form

HTML provides a number of elements that can be used together to create a form that users can fill out and submit to a web site or application. Please refer to HTML form guide

element describe
<button> HTML <button> element Represents a clickable button that can be used in form Or document where simple standard buttons are required.
<datalist> HTML <datalist> element Contains a set of option Elements that represent optional values for other form controls
<fieldset> This element contains All global properties
<form> HTML <form> element Represents a zone in a document that contains interactive controls for submitting information to a web server.
<input> HTML  <input> Elements Used to create interactive controls for Web-based forms to accept data from users; various types of input data and control widgets can be used, depending on the device and user agent.
<label> HTML <label> Element (label) Represents a description of an element in the user interface.
<legend> HTML <legend> Element is used to represent its parent element fieldset Content title of.
<meter> HTML The < meter > element is used to display scalar or fractional values of a known range.  
<optgroup> HTML elements <optgroup>   by select Element to create a group.
<option> HTML Element <option>   Used to define the select optgroup or datalist The item contained in the element. <option> Menu items can be represented in pop-up windows and in lists of other items in HTML documents.
<output> HTML  <output> Label Represents the result of a calculation or user action.
<progress> HTML Medium <progress> Element is used to show the progress of a task. Although the specification does not specify how to display the element, the browser developer can decide for itself, but usually, the element is displayed in the form of a progress bar
<select> HTML <select> Elements Represents a control that provides a menu of options:
<textarea> HTML <textarea> element Represents a multiline plain text editing control, which is useful when you want users to enter a fairly long, unformatted piece of text, such as a comment or a comment in a feedback form.

Interactive elements

HTML provides a series of elements that help create interactive user interface objects.

element describe
<details> HTML  <details> element You can create a widget that displays the information it contains only when it is switched to the expanded state.
<dialog> HTML <dialog> element Represents a dialog box or other interactive component, such as an inspector or window.
<menu> HTML <menu> element Presents a set of commands that the user can execute or activate. This includes both list menus that may appear at the top of the screen, as well as text menus hidden under the buttons and displayed when the button is clicked.
<summary> HTML  <summary>  Elements Used as a details A summary, title, or legend of a content for an element.

Web components

Web component is an HTML related technology. In short, it allows developers to create custom elements and use them just like normal HTML. In addition, you can create custom standard HTML elements.

element describe
<content> HTML <content> Elements —  Web components Waste part of technology kit for Shadow DOM Internal as an insertion point, and not available for any normal HTML, has now been slot Element instead, it creates a position in the DOM where the shadow DOM is inserted.  
<shadow> HTML <shadow> Elements Web components Obsolete part of the technology Suite - intended for use as a shadow DOM insertion point. If you create multiple shadow roots under shadow host, you may already be using it. There is no use in normal HTML.
<slot> HTML <slot> Elements, As Web Components Part of the technology suite is
<template> HTML content template( <template> )Elements Is a mechanism for saving client-side content that is not rendered when the page is loaded, but can then be instantiated at run time using JavaScript.

Obsolete and obsolete elements

Warning: The following old HTML elements have been discarded and should no longer be used. Never use them in new projects, and replace the remnants of old projects as soon as possible. It is listed here for reference only.

element describe
<acronym> HTML acronym element( <acronym>) Allows authors to explicitly declare a sequence of characters that form the acronym or abbreviation of a word.
<applet> Applet elements in HTML( <applet> )Indicates the applet that contains Java.
<basefont> The HTML tag < BASEFONT > is used to set the default font size of the document. use font Can be changed relative to the default font size.
<bgsound> < bgSound > is the element of setting the background music of web page in IE browser.
<big> The HTML Big Element ( <big> )It will make the font larger by one size (for example, from small to medium, from large to X-LARGE), up to the browser's maximum font size.
<blink> HTML Blink Element ( <blink> )It is not a standard element, it causes the text that contains it to flash.
<center> HTML center element( <center> )It's a Block level elements Can contain paragraphs, as well as other block level and inline elements. The entire content of this element is horizontally centered in its parent element (usually body )。
<content> HTML <content> Elements —  Web components Waste part of technology kit for Shadow DOM Internal as an insertion point, and not available for any normal HTML, has now been slot Element instead, it creates a position in the DOM where the shadow DOM is inserted.  
<dir> Abandoned HTML directory element <dir> )As a container for a directory of files and / or folders, there may also be styles and icons applied by the user agent.
<font> HTML font element <font> )The font size, color and performance of the content are defined.
<frame> <frame> Is an HTML element that defines a specific area in which another HTML document can be displayed. Frame should be in frameset In the.
<frameset> <frameset> Is a frame HTML element of.
<hgroup> This element contains only global attributes.
<image> HTML The < Image > element was once an experimental element for displaying images. It has never been implemented, please use standard img Element.
<isindex> < isindex > element The role of Causes the browser to display a dialog box that prompts the user for a single line of text. It is suggested in the W3C specification that, The < isindex > element is best placed in the   head But for browsers, the < isindex > tag doesn't matter anywhere on the page.
<keygen> HTML  <keygen> Element is to facilitate the generation of key material and submission as HTML form This mechanism is used to design a web based certificate management system. As expected, <keygen> The element will be used for the HTML form to construct a certificate request with other required information, and the result of this processing will be a signed certificate.
<listing> HTML list elements  ( <listing> )Rendered the text between the start and end tags without interpreting the HTML and using a constant width font. The html2 standard recommends that a line should not be disassembled when it does not exceed 132 characters.
<marquee> HTML marquee element( <marquee>) Used to insert a scrolling piece of text. You can use its properties to control what happens when the text reaches the edge of the container.
<menuitem> Users can use the HTML <menuitem> element Generate a pop-up menu. This includes context menus, as well as menus that may come with the button.
<multicol> The HTML < multicol > element is an experimental element designed to allow multiple column layouts. It has never had any significant traction and has not been implemented in any mainstream browser.
<nextid> <nextid> Is an obsolete HTML element that enables the next web designer to generate automatic name tags for its anchors. It is automatically generated by the web editing tool and does not require manual adjustment or input. By removing it from the official public DTD in the HTML version, the difference is that it is the first element to become one of the "missing tags.". It is also probably one of the least understood of all the early HTML elements.
<nobr>  HTML <nobr> Element prevents the text from automatically splitting into new lines, so it appears as a long line and may need to scroll. This tag is not standard HTML and should not be used. Instead, use CSS properties
<noembed> <noembed> The element is an obsolete and nonstandard way to turn embed , or does not support what the author wants Embedded content Provides alternative (or "fallback") content. This element was removed from HTML 4.01 to support
<noframes> <noframes> Is an HTML element used to support not supported frame Element, or a browser configured like this.
<plaintext> HTML plain text elements  ( <plaintext> )Render anything after the start tag as plain text and not interpreted as HTML. It doesn't have a closed label, because anything behind it is treated as plain text.
<rb> HTML Ruby Base <rb> )Elements are used to separate ruby The basic text component of the annotation (that is, the text being annotated). One <rb> The element should wrap each individual atomic segment of the base text.
<rtc> HTML <rtc> Elements Contains the semantic annotations of the text, which are in the rb Element. rb Elements can have pronunciation( rt )And semantics( rtc )Notes.
<shadow> HTML <shadow> Elements Web components Obsolete part of the technology Suite - intended for use as a shadow DOM insertion point. If you create multiple shadow roots under shadow host, you may already be using it. There is no use in normal HTML.
<spacer> <spacer> Is an obsolete HTML element that can insert intervals into a page. Designed by Netscape to achieve the same effect as a single pixel layout image, it is used by web designers to add white space to a page without actually using the image. But, <spacer> It is no longer supported by any mainstream browser, and the same effect can be easily implemented by CSS.
<strike> HTML <strike> Elements (or HTML strikeout element) places a strikeout on the text.
<tt> HTML telegraph text elements( <tt> )Generates an inline element that is displayed using the browser's built-in monotype font. This element is used to typeset the text so that it is displayed at the same width as a telegram. Use code Elements to display text of equal width may be more common.
<xmp> <xmp> The content between tags will not be parsed as document content, but will be directly rendered in the same width font. The html2 specification recommends that the content in this label should be wide enough to hold 80 letters per line.