HTML5
Summary
HTML5 is the newest revision of the HyperText Markup Language. It updates and replaces HTML 4.01 and XHTML 1.1. It is being standardized at W3C, and jointly developed by W3C and WHATWG. It is currently in W3C’s Candidate Recommendation phase, and is expected to be finalized as a Recommendation in 2014.
For more information, there is a developer-friendly version of the spec, HTML: The Markup Language, and a HTML5 differences from HTML4 document to find out what’s changed.
To get started using HTML5, you can read our HTML tutorials.
Here is a summary of which features are new, changed, or even obsolete in HTML5.
Elements
New Elements
There are 47 new elements in HTML5:
- article: article
- aside: tangential content
- audio: audio stream
- bdi: BiDi isolate
- canvas: canvas for dynamic graphics
- command type=checkbox: state or option that can be toggled
- command type=command: command with an associated action
- command type=radio: selection of one item from a list of items
- command: command
- datalist: predefined options for other controls
- details: control for additional on-demand information
- embed: integration point for plugins
- figcaption: figure caption
- figure: figure with optional caption
- footer: footer
- header: header
- hgroup: heading group
- input type=color: color-well control
- input type=datetime-local: local date-and-time input control
- input type=datetime: global date-and-time input control
- input type=date: date input control
- input type=email: e-mail address input control
- input type=month: year-and-month input control
- input type=number: number input control
- input type=range: imprecise number-input control
- input type=search: search field
- input type=tel: telephone-number-input field
- input type=time: time input control
- input type=url: URL input control
- input type=week: year-and-week input control
- keygen: key-pair generator/input control
- mark: marked (highlighted) text
- meta charset: document character-encoding declaration
- meter: scalar gauge
- nav: group of navigational links
- output: result of a calculation in a form
- progress: progress indicator
- rp: ruby parenthesis
- rt: ruby text
- ruby: ruby annotation
- section: section
- source: media source
- summary: summary, caption, or legend for a details control
- time: date and/or time
- track: supplementary media track
- video: video
- wbr: line-break opportunity
Changed Elements
There are 11 elements that were changed in HTML5:
- a: hyperlink
- b: offset text conventionally styled in bold
- cite: cited title of a work
- hr: thematic break
- input: input control
- i: offset text conventionally styled in italic
- menu: list of commands
- meta: metadata
- small: small print
- s: struck text
- u: offset text conventionally styled with an underline
Obsolete Elements
Several existing elements were declared obsolete in HTML5, though for the sake of completeness and handling legacy content, they are still defined in the specification. However, authors should not use these elements.
There are different reasons for these elements being made obsolete:
- they are purely presentational, and CSS should be used instead
- they harm usability and accessibility
- they are confusing, duplicative, or rarely used
There are 13 elements made obsolete in HTML5:
- acronym: duplicate. Use abbr for abbreviations instead
- applet: duplicate. Use object instead
- basefont: presentational. Use CSS instead
- big: presentational. Use CSS font-size instead
- center: presentational. Use CSS align instead
- dir: duplicate. Use ul instead
- font: presentational. Use CSS font-family instead
- frameset: harmful
- frame: harmful
- isindex: duplicate. Use form controls instead
- noframes: harmful
- strike: presentational. Use CSS instead
- tt: presentational. Use CSS instead
Existing Elements
There are 84 unchanged elements in HTML5:
- abbr: abbreviation
- address: contact information
- area: image-map hyperlink
- base: base URL
- bdo: BiDi override
- blockquote: block quotation
- body: document body
- br: line break
- button type=button: button with no additional semantics
- button type=reset: reset button
- button type=submit: submit button
- button: button
- caption: table title
- code: code fragment
- colgroup: table column group
- col: table column
- dd: description or value
- del: deleted text
- dfn: defining instance
- div: generic flow container
- dl: description list
- dt: term or name
- em: emphatic stress
- fieldset: set of related form controls
- form: user-submittable form
- h1: heading
- h2: heading
- h3: heading
- h4: heading
- h5: heading
- h6: heading
- head: document metadata container
- html: root element
- iframe: nested browsing context (inline frame)
- img: image
- input type=button: button
- input type=checkbox: checkbox
- input type=file: file upload control
- input type=hidden: hidden input control
- input type=image: image-coordinates input control
- input type=password: password-input field
- input type=radio: radio button
- input type=reset: reset button
- input type=submit: submit button
- input type=text: text-input field
- ins: inserted text
- kbd: user input
- label: caption for a form control
- legend: title or explanatory caption
- link: inter-document relationship metadata
- li: list item
- map: image-map definition
- meta http-equiv=content-type: document character-encoding declaration
- meta http-equiv=default-style: “preferred stylesheet” pragma directive
- meta http-equiv=refresh: “refresh” pragma directive
- meta name: name-value metadata
- noscript: fallback content for script
- object: generic external content
- ol: ordered list
- optgroup: group of options
- option: option
- param: initialization parameters for plugins
- pre: preformatted text
- p: paragraph
- q: quoted text
- samp: (sample) output
- script: embedded script
- select: option-selection form control
- span: generic span
- strong: strong importance
- style: style (presentation) information
- sub: subscript
- sup: superscript
- table: table
- tbody: table row group
- td: table cell
- textarea: text input area
- tfoot: table footer row group
- thead: table heading group
- th: table header cell
- title: document title
- tr: table row
- ul: unordered list
- var: variable or placeholder text