HTML5 Tags
Xah Lee, 2011-06-26, 2011-07-01
This page is a COMPLETE list of HTML5 tags.
Those marked with a dagger† are new in html5.
HTML Structure Tags
| head | meta info |
| html | |
| meta | meta tag used inside “head” tag |
| title | document title, used inside “head” tag |
| base | base URL |
| body | |
Page Structure
| nav† | navigation markup |
| header† | page's header |
| footer† | page's footer |
| aside† | Sidebar |
| article† | Enclose a article. (e.g. essay) |
| section† | section markup |
See: html5 tags test page: header, footer, nav, article, section, aside.
Title/Section Heading
| h1 | headline 1 |
| h2 | headline 2 |
| h3 | headline 3 |
| h4 | headline 4 |
| h5 | headline 5 |
| h6 | headline 6 |
| hgroup† | Used to group one of “h1” to “h6”. |
Text Block
| div | generic block markup. Use with css |
| p | paragraph |
| pre | monospace block |
| blockquote | quote passages, excerpt |
| ul | unordered list |
| ol | ordered list |
| li | list item. (use with “ul” or “ol”) |
Table
| table | table |
| caption | table caption |
| td | table cell |
| tr | table row |
| th | table header |
| tbody | table body |
| thead | table header |
| tfoot | table footer |
HTML Table Examples
Forms
| form | |
| button | Render as Button. Used together with javascript. |
| input | Generic input (text, radio box, checkbox, submit button) |
| textarea | large text input (e.g. comment) |
| select | menu. |
| option | Menu item. Used with “select”. |
| optgroup | Menu item group label. |
| label | A label for a form input |
HTML Form Example
Inline Text Markup
| span | generic text markup. Use with css |
| em | emphasize |
| b | bold |
| i | italic |
| s | strike-thru |
| del | strike-thru. Meaning “deleted text”. |
| ins | renders newly inserted text (in contrast to “del”) |
| small | smaller |
| strong | emphasis |
| sup | superscript |
| sub | subscript |
| dfn | definition term |
| code | computer code |
| var | variable |
| samp | sample code |
| kbd | keyboard |
| q | short inline quote. “q” example |
| cite | citation |
See: test page for HTML text style Tags.
Misc
Image
| img | |
| figcaption† | caption for images |
| figure† | group images |
| map | Image Map example |
| area | image map. Used inside “map” tag. |
See: HTML5 “figure” & “figurecaption” example.
Audio, Video, Special Objects
| script | See: Javascript Basics. |
| noscript | e.g. <noscript>displayed when javascript is off</noscript> |
| object | embedded object. Object example. |
| param | parameter, used with “object” tag |
| embed† | interactive content or plugin |
| video† | video. See Video/Audio Example |
| iframe | embed a page; inner window. Iframe example |
| canvas† | interactive graphics, games |
I'll be adding a example each day of the following new tags.
| abbr | e.g. <abbr title="eXtensible Markup Language">XML</abbr>; abbr example |
| address | markup for address. (e.g. street, city, etc.) |
| audio† | For embedding sonud files. |
| bdo | text direction |
| col | ? table columns |
| colgroup | ? table columns |
| command† | ? command button |
| datalist† | ? dropdown list |
| dd | ? definition description |
| details† | ? |
| dl | ? |
| dt | ? |
| fieldset | ? |
| legend | title in a fieldset |
| keygen† | ? |
| link | ? |
| mark† | ? marked text |
| menu | ? menu list |
| meter† | ? |
| output† | ? |
| progress† | progress bar |
| rp† | ruby annotation |
| rt† | ruby annotation |
| ruby† | ruby annotation (pronunciation for asian lang) |
| source† | ? media resources |
| style | ? |
| summary† | ? header of a "detail" element |
| time† | ? date/time |
| wbr† | ? possible line-break |
Obsolete HTML4 Tags
| acronym | use “abbr” |
| applet | use “embed” or “object” |
| basefont | use css |
| big | use css |
| center | use css. See: Centering with CSS. |
| dir | Directory list. Use “ul” |
| font | use css |
| frame | use css, iframe |
| frameset | use css, iframe |
| noframes | |
| strike | use “s”. See: “s” vs “strike” vs “del”. |
| tt | stands for “teletype”, rendered in monospace font. Use “code”, “samp”, or css. |
| u | underline. Use css. |
| xmp | use “pre” with css. |
Reference
blog comments powered by