HTML Tags
Every common HTML element: what it does, its syntax and a live example.
106 of 106
| Name | Description |
|---|---|
| <!DOCTYPE> | Declares the document type so browsers use standards mode. |
| <html> | The root element of an HTML page. |
| <head> | Holds metadata about the page: title, styles, scripts. |
| <title> | Sets the page title shown in the browser tab. |
| <meta> | Provides metadata such as the character set or viewport. |
| <link> | Links an external resource such as a stylesheet. |
| <style> | Contains CSS rules for the page. |
| <script> | Embeds or links JavaScript. |
| <noscript> | Content shown when scripts are disabled. |
| <body> | Contains everything visible on the page. |
| <h1>-<h6> | Headings from most to least important. |
| <p> | A paragraph of text. |
| <br> | Inserts a line break. |
| <hr> | A thematic break, shown as a horizontal rule. |
| <div> | A generic block container, used for layout and styling. |
| <span> | A generic inline container. |
| <a> | Creates a hyperlink. |
| <img> | Embeds an image. |
| <strong> | Marks text of strong importance (bold). |
| <em> | Marks emphasised text (italic). |
| <b> | Bold text without extra importance. |
| <i> | Italic text, for example a technical term. |
| <u> | Underlined text. |
| <mark> | Highlights text. |
| <small> | Smaller print, such as fine print. |
| <sub> | Subscript text. |
| <sup> | Superscript text. |
| <del> | Marks deleted text. |
| <ins> | Marks inserted text. |
| <code> | Inline computer code. |
| <pre> | Preformatted text that keeps spaces and line breaks. |
| <kbd> | Keyboard input. |
| <samp> | Sample output from a program. |
| <var> | A variable in a mathematical or programming context. |
| <blockquote> | A long quotation from another source. |
| <q> | A short inline quotation. |
| <cite> | The title of a creative work. |
| <abbr> | An abbreviation, with its full form in the title attribute. |
| <address> | Contact information for the author. |
| <time> | A date or time in machine-readable form. |
| <ul> | An unordered (bulleted) list. |
| <ol> | An ordered (numbered) list. |
| <li> | A list item inside ul or ol. |
| <dl> | A description list of terms and descriptions. |
| <dt> | A term in a description list. |
| <dd> | A description in a description list. |
| <table> | Defines a table. |
| <tr> | A row in a table. |
| <th> | A header cell in a table. |
| <td> | A data cell in a table. |
| <thead> | Groups the header rows of a table. |
| <tbody> | Groups the body rows of a table. |
| <tfoot> | Groups the footer rows of a table. |
| <caption> | A table caption. |
| <form> | A form for collecting user input. |
| <input> | An input control: text, checkbox, radio, date, and more. |
| <textarea> | A multi-line text input. |
| <button> | A clickable button. |
| <select> | A dropdown list. |
| <option> | An option in a select list. |
| <optgroup> | Groups options inside a select. |
| <label> | A label for a form control. |
| <fieldset> | Groups related form controls. |
| <legend> | A caption for a fieldset. |
| <datalist> | A list of predefined options for an input. |
| <progress> | A progress bar. |
| <meter> | A gauge within a known range. |
| <header> | Introductory content for a page or section. |
| <nav> | A block of navigation links. |
| <main> | The main content of the page. |
| <section> | A thematic grouping of content. |
| <article> | A self-contained piece of content. |
| <aside> | Content related to the surrounding content, like a sidebar. |
| <footer> | Footer for a page or section. |
| <figure> | Self-contained media with an optional caption. |
| <figcaption> | A caption for a figure. |
| <details> | A disclosure widget that can be opened and closed. |
| <summary> | The visible heading of a details element. |
| <dialog> | A dialog box or window. |
| <audio> | Embeds sound. |
| <video> | Embeds a video. |
| <source> | A media source for audio, video or picture. |
| <picture> | Lets the browser choose between image sources. |
| <canvas> | A drawing surface controlled with JavaScript. |
| <svg> | Inline vector graphics. |
| <iframe> | Embeds another page inside this one. |
| <template> | Holds markup that is not shown until JavaScript uses it. |
| <slot> | A placeholder inside a web component. |
| <wbr> | A place where the browser may break a long word. |
| <bdo> | Overrides the text direction. |
| <ruby> | Annotation for East Asian typography. |
| <map> | Defines a clickable image map. |
| <area> | A clickable area inside an image map. |
| <base> | Sets the base URL for relative links. |
| <col> | Sets properties for a column in a table. |
| <colgroup> | Groups table columns. |
| <output> | The result of a calculation or user action. |
| <menu> | A list of commands. |
| <data> | Links content with a machine-readable value. |
| <dfn> | The defining instance of a term. |
| <s> | Text that is no longer accurate. |
| <embed> | Embeds external content such as a plugin. |
| <object> | Embeds an external resource. |
| <track> | A text track for video or audio (subtitles). |
| <param> | A parameter for an object element (obsolete). |
| <center> | Centres content (obsolete: use CSS). |