HTML5

18
HTML5 A vocabulary and associated APIs for HTML and XHTML Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1 1 of 18 3/13/14, 11:32 AM

description

vocabulary HTML, W3 School

Transcript of HTML5

Page 1: HTML5

HTML5A vocabulary and associated APIs for HTML and XHTML

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

1 of 18 3/13/14, 11:32 AM

Page 2: HTML5

W3C Candidate Recommendation 04 February 2014← 12 IANA considerations – Table of contents – References →

IndexElementsElement content categoriesAttributesElement InterfacesAll InterfacesEvents

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

2 of 18 3/13/14, 11:32 AM

Page 3: HTML5

Index

The following sections only cover conforming elements and features.

Elements

This section is non-normative.

List of elementsElement Description Categories Parents† Children Attributes Interface

a Hyperlink flow; phrasing*;interactive

phrasing transparent* globals; href;target;download; rel;hreflang; type

HTMLAnchorElement

abbr Abbreviation flow; phrasing phrasing phrasing globals HTMLElement

address Contactinformation for apage or articleelement

flow flow flow* globals HTMLElement

area Hyperlink ordead area on animage map

flow; phrasing phrasing* empty globals; alt;coords; shape;href; target;download; rel;hreflang; type

HTMLAreaElement

article Self-containedsyndicatable orreusablecomposition

flow; sectioning flow flow globals HTMLElement

aside Sidebar fortangentiallyrelated content

flow; sectioning flow flow globals HTMLElement

audio Audio player flow; phrasing;embedded;interactive

phrasing source*;transparent*

globals; src;crossorigin;preload;autoplay;mediagroup;loop; muted;controls

HTMLAudioElement

b Keywords flow; phrasing phrasing phrasing globals HTMLElement

base Base URL anddefault targetbrowsing contextfor hyperlinksand forms

metadata head;template

empty globals; href;target

HTMLBaseElement

bdi Textdirectionalityisolation

flow; phrasing phrasing phrasing globals HTMLElement

bdo Textdirectionalityformatting

flow; phrasing phrasing phrasing globals HTMLElement

blockquote A section quotedfrom anothersource

flow; sectioningroot

flow flow globals; cite HTMLQuoteElement

body Document body sectioning root html flow globals;onafterprint;onbeforeprint;onbeforeunload;onhashchange;onmessage;onoffline;ononline;onpagehide;onpageshow;onpopstate;onstorage;onunload

HTMLBodyElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

3 of 18 3/13/14, 11:32 AM

Page 4: HTML5

Element Description Categories Parents† Children Attributes Interfacebr Line break, e.g.

in poem orpostal address

flow; phrasing phrasing empty globals HTMLBRElement

button Button control flow; phrasing;interactive;listed; labelable;submittable;reassociateable;form-associated

phrasing phrasing* globals;autofocus;disabled; form;formaction;formenctype;formmethod;formnovalidate;formtarget;name; type;value

HTMLButtonElement

canvas Scriptablebitmap canvas

flow; phrasing;embedded

phrasing transparent globals; width;height

HTMLCanvasElement

caption Table caption none table;template

flow* globals HTMLTableCaptionElement

cite Title of a work flow; phrasing phrasing phrasing globals HTMLElement

code Computer code flow; phrasing phrasing phrasing globals HTMLElement

col Table column none colgroup;template

empty globals; span HTMLTableColElement

colgroup Group ofcolumns in atable

none table;template

col*; script-supportingelements*

globals; span HTMLTableColElement

data Machine-readableequivalent

flow; phrasing phrasing phrasing globals; value HTMLDataElement

datalist Container foroptions forcombo boxcontrol

flow; phrasing phrasing phrasing;option

globals HTMLDataListElement

dd Content forcorrespondingdt element(s)

none dl;template

flow globals HTMLElement

del A removal fromthe document

flow; phrasing* phrasing transparent globals; cite;datetime

HTMLModElement

details Disclosurecontrol for hidingdetails

flow; sectioningroot; interactive

flow summary*; flow globals; open HTMLDetailsElement

dfn Defininginstance

flow; phrasing phrasing phrasing* globals HTMLElement

dialog Dialog box orwindow

flow; sectioningroot

flow flow globals; open HTMLDialogElement

div Generic flowcontainer

flow flow flow globals HTMLDivElement

dl Association listconsisting ofzero or morename-valuegroups

flow flow dt*; dd*; script-supportingelements

globals HTMLDListElement

dt Legend forcorrespondingdd element(s)

none dl;template

flow* globals HTMLElement

em Stress emphasis flow; phrasing phrasing phrasing globals HTMLElement

embed Plugin flow; phrasing;embedded;interactive

phrasing empty globals; src;type; width;height; any*

HTMLEmbedElement

fieldset Group of formcontrols

flow; sectioningroot; listed;reassociateable;form-associated

flow legend*; flow globals;disabled; form;name

HTMLFieldSetElement

figcaption Caption forfigure

none figure;template

flow globals HTMLElement

figure Figure withoptional caption

flow; sectioningroot

flow figcaption*;flow

globals HTMLElement

footer Footer for apage or section

flow flow flow* globals HTMLElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

4 of 18 3/13/14, 11:32 AM

Page 5: HTML5

Element Description Categories Parents† Children Attributes Interfaceform User-submittable

formflow flow flow* globals;

accept-charset;action;autocomplete;enctype;method; name;novalidate;target

HTMLFormElement

h1, h2, h3,h4, h5, h6

Section heading flow; heading flow phrasing globals HTMLHeadingElement

head Container fordocumentmetadata

none html metadatacontent*

globals HTMLHeadElement

header Introductory ornavigational aidsfor a page orsection

flow flow flow* globals HTMLElement

hr Thematic break flow flow empty globals HTMLHRElement

html Root element none none* head*; body* globals;manifest

HTMLHtmlElement

i Alternate voice flow; phrasing phrasing phrasing globals HTMLElement

iframe Nested browsingcontext

flow; phrasing;embedded;interactive

phrasing text* globals; src;srcdoc; name;sandbox;seamless;width; height

HTMLIFrameElement

img Image flow; phrasing;embedded;interactive*;form-associated

phrasing empty globals; alt;src;crossorigin;usemap; ismap;width; height

HTMLImageElement

input Form control flow; phrasing;interactive*;listed; labelable;submittable;resettable;reassociateable;form-associated

phrasing empty globals; accept;alt;autocomplete;autofocus;checked;dirname;disabled; form;formaction;formenctype;formmethod;formnovalidate;formtarget;height; list;max; maxlength;min; minlength;multiple; name;pattern;placeholder;readonly;required; size;src; step; type;value; width

HTMLInputElement

ins An addition tothe document

flow; phrasing* phrasing transparent globals; cite;datetime

HTMLModElement

kbd User input flow; phrasing phrasing phrasing globals HTMLElement

keygen Cryptographickey-pairgenerator formcontrol

flow; phrasing;interactive;listed; labelable;submittable;resettable;reassociateable;form-associated

phrasing empty globals;autofocus;challenge;disabled; form;keytype; name

HTMLKeygenElement

label Caption for aform control

flow; phrasing;interactive;reassociateable;form-associated

phrasing phrasing* globals; form;for

HTMLLabelElement

legend Caption forfieldset

none fieldset;template

phrasing globals HTMLLegendElement

li List item none ol; ul;template

flow globals; value* HTMLLIElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

5 of 18 3/13/14, 11:32 AM

Page 6: HTML5

Element Description Categories Parents† Children Attributes Interfacelink Link metadata metadata; flow*;

phrasing*head;template;noscript*;phrasing*

empty globals; href;crossorigin;rel; media;hreflang; type;sizes

HTMLLinkElement

main Main content ofa document

flow flow flow* globals HTMLElement

map Image map flow; phrasing* phrasing transparent;area*

globals; name HTMLMapElement

mark Highlight flow; phrasing phrasing phrasing globals HTMLElement

meta Text metadata metadata; flow*;phrasing*

head;template;noscript*;phrasing*

empty globals; name;http-equiv;content;charset

HTMLMetaElement

meter Gauge flow; phrasing;labelable

phrasing phrasing* globals; value;min; max; low;high; optimum

HTMLMeterElement

nav Section withnavigationallinks

flow; sectioning flow flow globals HTMLElement

noscript Fallback contentfor script

metadata; flow;phrasing

head*;template*;phrasing*

varies* globals HTMLElement

object Image, nestedbrowsingcontext, orplugin

flow; phrasing;embedded;interactive*;listed;submittable;reassociateable;form-associated

phrasing param*;transparent

globals; data;type;typemustmatch;name; usemap;form; width;height

HTMLObjectElement

ol Ordered list flow flow li; script-supportingelements

globals;reversed;start; type

HTMLOListElement

optgroup Group of optionsin a list box

none select;template

option; script-supportingelements

globals;disabled; label

HTMLOptGroupElement

option Option in a listbox or combobox control

none select;datalist;optgroup;template

text* globals;disabled;label;selected; value

HTMLOptionElement

output Calculatedoutput value

flow; phrasing;listed; labelable;resettable;reassociateable;form-associated

phrasing phrasing globals; for;form; name

HTMLOutputElement

p Paragraph flow flow phrasing globals HTMLParagraphElement

param Parameter forobject

none object;template

empty globals; name;value

HTMLParamElement

pre Block ofpreformatted text

flow flow phrasing globals HTMLPreElement

progress Progress bar flow; phrasing;labelable

phrasing phrasing* globals; value;max

HTMLProgressElement

q Quotation flow; phrasing phrasing phrasing globals; cite HTMLQuoteElement

rb Ruby base none ruby;template

phrasing globals HTMLElement

rp Parenthesis forruby annotationtext

none ruby;template

phrasing globals HTMLElement

rt Ruby annotationtext

none ruby; rtc;template

phrasing globals HTMLElement

rtc Ruby annotationtext container

none ruby;template

phrasing globals HTMLElement

ruby Rubyannotation(s)

flow; phrasing phrasing phrasing; rp;rt; rb; rtc*

globals HTMLElement

s Inaccurate text flow; phrasing phrasing phrasing globals HTMLElement

samp Computer output flow; phrasing phrasing phrasing globals HTMLElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

6 of 18 3/13/14, 11:32 AM

Page 7: HTML5

Element Description Categories Parents† Children Attributes Interfacescript Embedded script metadata; flow;

phrasing; script-supporting

head;phrasing;script-supporting

script, data, orscriptdocumentation*

globals; src;type; charset;async; defer;crossorigin

HTMLScriptElement

section Genericdocument orapplicationsection

flow; sectioning flow flow globals HTMLElement

select List box control flow; phrasing;interactive;listed; labelable;submittable;resettable;reassociateable;form-associated

phrasing option,optgroup

globals;autofocus;disabled; form;multiple; name;required; size

HTMLSelectElement

small Side comment flow; phrasing phrasing phrasing globals HTMLElement

source Media source forvideo or audio

none video;audio;template

empty globals; src;type; media

HTMLSourceElement

span Genericphrasingcontainer

flow; phrasing phrasing phrasing globals HTMLSpanElement

strong Importance flow; phrasing phrasing phrasing globals HTMLElement

style Embeddedstylinginformation

metadata; flow head;noscript*;flow*

varies* globals; media;type; scoped

HTMLStyleElement

sub Subscript flow; phrasing phrasing phrasing globals HTMLElement

summary Caption fordetails

none details phrasing globals HTMLElement

sup Superscript flow; phrasing phrasing phrasing globals HTMLElement

table Table flow flow caption*;colgroup*;thead*; tbody*;tfoot*; tr*;script-supportingelements

globals; border HTMLTableElement

tbody Group of rows ina table

none table;template

tr; script-supportingelements

globals HTMLTableSectionElement

td Table cell sectioning root tr;template

flow globals;colspan;rowspan;headers

HTMLTableDataCellElement

template Template metadata; flow;phrasing; script-supporting

metadata;phrasing;script-supporting;colgroup*

it'scomplicated*

globals HTMLTemplateElement

textarea Multiline textfield

flow; phrasing;interactive;listed; labelable;submittable;resettable;reassociateable;form-associated

phrasing text globals;autofocus;cols; dirname;disabled; form;maxlength;minlength;name;placeholder;readonly;required; rows;wrap

HTMLTextAreaElement

tfoot Group of footerrows in a table

none table;template

tr; script-supportingelements

globals HTMLTableSectionElement

th Table headercell

none tr;template

flow* globals;colspan;rowspan;headers; scope;abbr

HTMLTableHeaderCellElement

thead Group ofheading rows ina table

none table;template

tr; script-supportingelements

globals HTMLTableSectionElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

7 of 18 3/13/14, 11:32 AM

Page 8: HTML5

Element Description Categories Parents† Children Attributes Interfacetime Machine-

readableequivalent ofdate- ortime-related data

flow; phrasing phrasing phrasing globals;datetime

HTMLTimeElement

title Document title metadata head;template

text* globals HTMLTitleElement

tr Table row none table;thead;tbody;tfoot;template

th*; td; script-supportingelements

globals HTMLTableRowElement

track Timed text track none audio;video;template

empty globals;default; kind;label; src;srclang

HTMLTrackElement

u Keywords flow; phrasing phrasing phrasing globals HTMLElement

ul List flow flow li; script-supportingelements

globals HTMLUListElement

var Variable flow; phrasing phrasing phrasing globals HTMLElement

video Video player flow; phrasing;embedded;interactive

phrasing source*;transparent*

globals; src;crossorigin;poster;preload;autoplay;mediagroup;loop; muted;controls;width; height

HTMLVideoElement

wbr Line breakingopportunity

flow; phrasing phrasing empty globals HTMLElement

An asterisk (*) in a cell indicates that the actual rules are more complicated than indicated in the table above.

† Categories in the "Parents" column refer to parents that list the given categories in their content model, not to elementsthat themselves are in those categories. For example, the a element's "Parents" column says "phrasing", so any elementwhose content model contains the "phrasing" category could be a parent of an a element. Since the "flow" category includesall the "phrasing" elements, that means the th element could be a parent to an a element.

Element content categories

This section is non-normative.

List of element content categoriesCategory Elements Elements with exceptions

Metadata content base; link; meta; noscript; script; style; template; title —Flow content a; abbr; address; article; aside; audio; b; bdi; bdo;

blockquote; br; button; canvas; cite; code; data; datalist;del; details; dfn; dialog; div; dl; em; embed; fieldset;figure; footer; form; h1; h2; h3; h4; h5; h6; header; hr; i;iframe; img; input; ins; kbd; keygen; label; main; map; mark;math; meter; nav; noscript; object; ol; output; p; pre;progress; q; ruby; s; samp; script; section; select; small;span; strong; sub; sup; svg; table; template; textarea;time; u; ul; var; video; wbr; Text

area (if it is a descendant of a map element);style (if the scoped attribute is present)

Sectioningcontent

article; aside; nav; section —

Heading content h1; h2; h3; h4; h5; h6; —Phrasing content a; abbr; audio; b; bdi; bdo; br; button; canvas; cite; code;

data; datalist; del; dfn; em; embed; i; iframe; img; input;ins; kbd; keygen; label; map; mark; math; meter; noscript;object; output; progress; q; ruby; s; samp; script; select;small; span; strong; sub; sup; svg; template; textarea;time; u; var; video; wbr; Text

area (if it is a descendant of a map element)

Embeddedcontent

audio canvas embed iframe img math object svg video —

Interactivecontent

a; button; details; embed; iframe; keygen; label; select;textarea;

audio (if the controls attribute is present);img (if the usemap attribute is present); input(if the type attribute is not in the Hidden

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

8 of 18 3/13/14, 11:32 AM

Page 9: HTML5

Category Elements Elements with exceptionsstate); object (if the usemap attribute ispresent); video (if the controls attribute ispresent)

Sectioning roots blockquote; body; details; dialog; fieldset; figure; td —Form-associatedelements

button; fieldset; input; keygen; label; object; output;select; textarea; img

Listed elements button; fieldset; input; keygen; object; output; select;textarea

Submittableelements

button; input; keygen; object; select; textarea —

Resettableelements

input; keygen; output; select; textarea —

Labelableelements

button; input; keygen; meter; output; progress; select;textarea

Reassociateableelements

button; fieldset; input; keygen; label; object; output;select; textarea

Palpable content a; abbr; address; article; aside; b; bdi; bdo; blockquote;button; canvas; cite; code; data; details; dfn; div; em;embed; fieldset; figure; footer; form; h1; h2; h3; h4; h5; h6;header; i; iframe; img; ins; kbd; keygen; label; main; map;mark; math; meter; nav; object; output; p; pre; progress; q;ruby; s; samp; section; select; small; span; strong; sub;sup; svg; table; textarea; time; u; var; video

audio (if the controls attribute is present);dl (if the element's children include at leastone name-value group); input (if the typeattribute is not in the Hidden state); ol (ifthe element's children include at least oneli element); ul (if the element's childreninclude at least one li element); Text thatis not inter-element whitespace

Script-supportingelements

script; template —

Attributes

This section is non-normative.

List of attributes (excluding event handler content attributes)Attribute Element(s) Description Value

abbr th Alternative label to use for theheader cell when referencingthe cell in other contexts

Text*

accept input Hint for expected file type in fileupload controls

Set of comma-separated tokens* consisting ofvalid MIME types with no parameters or audio/*,video/*, or image/*

accept-charset form Character encodings to use forform submission

Ordered set of unique space-separated tokens,ASCII case-insensitive, consisting of labels ofASCII-compatible character encodings*

accesskey HTML elements Keyboard shortcut to activateor focus element

Ordered set of unique space-separated tokens,case-sensitive, consisting of one Unicode codepoint in length

action form URL to use for formsubmission

Valid non-empty URL potentially surrounded byspaces

alt area; img; input Replacement text for use whenimages are not available

Text*

async script Execute script asynchronously Boolean attributeautocomplete form Default setting for autofill

feature for controls in the form"on"; "off"

autocomplete input; select;textarea

Hint for form autofill feature Autofill field name and related tokens*

autofocus button; input;keygen; select;textarea

Automatically focus the formcontrol when the page isloaded

Boolean attribute

autoplay audio; video Hint that the media resourcecan be started automaticallywhen the page is loaded

Boolean attribute

border table Explicit indication that thetable element is not beingused for layout purposes

The empty string, or "1"

challenge keygen String to package with thegenerated and signed publickey

Text

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

9 of 18 3/13/14, 11:32 AM

Page 10: HTML5

Attribute Element(s) Description Valuecharset meta Character encoding declaration Encoding label*charset script Character encoding of the

external script resourceEncoding label*

checked input Whether the control is checked Boolean attributecite blockquote; del;

ins; qLink to the source of thequotation or more informationabout the edit

Valid URL potentially surrounded by spaces

class HTML elements Classes to which the elementbelongs

Set of space-separated tokens

cols textarea Maximum number ofcharacters per line

Valid non-negative integer greater than zero

colspan td; th Number of columns that thecell is to span

Valid non-negative integer greater than zero

content meta Value of the element Text*contenteditable HTML elements Whether the element is

editable"true"; "false"

controls audio; video Show user agent controls Boolean attributecoords area Coordinates for the shape to

be created in an image mapValid list of integers*

crossorigin audio; img; link;script; video

How the element handlescrossorigin requests

"anonymous"; "use-credentials"

data object Address of the resource Valid non-empty URL potentially surrounded byspaces

datetime del; ins Date and (optionally) time ofthe change

Valid date string with optional time

datetime time Machine-readable value Valid month string, valid date string, valid yearlessdate string, valid time string, valid local date andtime string, valid time-zone offset string, validglobal date and time string, valid week string, validnon-negative integer, or valid duration string

default track Enable the track if no other texttrack is more suitable

Boolean attribute

defer script Defer script execution Boolean attributedir HTML elements The text directionality of the

element"ltr"; "rtl"; "auto"

dir bdo The text directionality of theelement

"ltr"; "rtl"

dirname input; textarea Name of form field to use forsending the element'sdirectionality in formsubmission

Text*

disabled button; fieldset;input; keygen;optgroup; option;select; textarea

Whether the form control isdisabled

Boolean attribute

download a; area Whether to download theresource instead of navigatingto it, and its file name if so

Text

draggable HTML elements Whether the element isdraggable

"true"; "false"

dropzone HTML elements Accepted item types fordrag-and-drop

Unordered set of unique space-separated tokens,ASCII case-insensitive, consisting of acceptedtypes and drag feedback*

enctype form Form data set encoding type touse for form submission

"application/x-www-form-urlencoded";"multipart/form-data"; "text/plain"

for label Associate the label with formcontrol

ID*

for output Specifies controls from whichthe output was calculated

Unordered set of unique space-separated tokens,case-sensitive, consisting of IDs*

form button; fieldset;input; keygen;label; object;output; select;textarea

Associates the control with aform element

ID*

formaction button; input URL to use for formsubmission

Valid non-empty URL potentially surrounded byspaces

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

10 of 18 3/13/14, 11:32 AM

Page 11: HTML5

Attribute Element(s) Description Valueformenctype button; input Form data set encoding type to

use for form submission"application/x-www-form-urlencoded";"multipart/form-data"; "text/plain"

formmethod button; input HTTP method to use for formsubmission

"GET"; "POST"

formnovalidate button; input Bypass form control validationfor form submission

Boolean attribute

formtarget button; input Browsing context for formsubmission

Valid browsing context name or keyword

headers td; th The header cells for this cell Unordered set of unique space-separated tokens,case-sensitive, consisting of IDs*

height canvas; embed;iframe; img; input;object; video

Vertical dimension Valid non-negative integer

hidden HTML elements Whether the element isrelevant

Boolean attribute

high meter Low limit of high range Valid floating-point number*href a; area Address of the hyperlink Valid URL potentially surrounded by spaceshref link Address of the hyperlink Valid non-empty URL potentially surrounded by

spaceshref base Document base URL Valid URL potentially surrounded by spaceshreflang a; area; link Language of the linked

resourceValid BCP 47 language tag

http-equiv meta Pragma directive Text*id HTML elements The element's ID Text*ismap img Whether the image is a

server-side image mapBoolean attribute

keytype keygen The type of cryptographic keyto generate

Text*

kind track The type of text track "subtitles"; "captions"; "descriptions";"chapters"; "metadata"

label optgroup; option;track

User-visible label Text

lang HTML elements Language of the element Valid BCP 47 language tag or the empty stringlist input List of autocomplete options ID*loop audio; video Whether to loop the media

resourceBoolean attribute

low meter High limit of low range Valid floating-point number*manifest html Application cache manifest Valid non-empty URL potentially surrounded by

spacesmax input Maximum value Varies*max meter; progress Upper bound of range Valid floating-point number*maxlength input; textarea Maximum length of value Valid non-negative integermedia link; source; style Applicable media Valid media querymediagroup audio; video Groups media elements

together with an implicitMediaController

Text

method form HTTP method to use for formsubmission

"GET"; "POST";

min input Minimum value Varies*min meter Lower bound of range Valid floating-point number*minlength input; textarea Minimum length of value Valid non-negative integermultiple input; select Whether to allow multiple

valuesBoolean attribute

muted audio; video Whether to mute the mediaresource by default

Boolean attribute

name button; fieldset;input; keygen;output; select;textarea

Name of form control to use forform submission and in theform.elements API

Text*

name form Name of form to use in thedocument.forms API

Text*

name iframe; object Name of nested browsingcontext

Valid browsing context name or keyword

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

11 of 18 3/13/14, 11:32 AM

Page 12: HTML5

Attribute Element(s) Description Valuename map Name of image map to

reference from the usemapattribute

Text*

name meta Metadata name Text*name param Name of parameter Textnovalidate form Bypass form control validation

for form submissionBoolean attribute

open details Whether the details are visible Boolean attributeopen dialog Whether the dialog box is

showingBoolean attribute

optimum meter Optimum value in gauge Valid floating-point number*pattern input Pattern to be matched by the

form control's valueRegular expression matching the JavaScriptPattern production

placeholder input; textarea User-visible label to be placedwithin the form control

Text*

poster video Poster frame to show prior tovideo playback

Valid non-empty URL potentially surrounded byspaces

preload audio; video Hints how much buffering themedia resource will likely need

"none"; "metadata"; "auto"

readonly input; textarea Whether to allow the value tobe edited by the user

Boolean attribute

rel a; area; link Relationship between thedocument containing thehyperlink and the destinationresource

Set of space-separated tokens*

required input; select;textarea

Whether the control is requiredfor form submission

Boolean attribute

reversed ol Number the list backwards Boolean attributerows textarea Number of lines to show Valid non-negative integer greater than zerorowspan td; th Number of rows that the cell is

to spanValid non-negative integer

sandbox iframe Security rules for nestedcontent

Unordered set of unique space-separated tokens,ASCII case-insensitive, consisting of "allow-forms", "allow-pointer-lock", "allow-popups","allow-same-origin", "allow-scripts and "allow-top-navigation"

spellcheck HTML elements Whether the element is to haveits spelling and grammarchecked

"true"; "false"

scope th Specifies which cells theheader cell applies to

"row"; "col"; "rowgroup"; "colgroup"

scoped style Whether the styles apply to theentire document or just theparent subtree

Boolean attribute

seamless iframe Whether to apply thedocument's styles to thenested content

Boolean attribute

selected option Whether the option is selectedby default

Boolean attribute

shape area The kind of shape to becreated in an image map

"circle"; "default"; "poly"; "rect"

size input; select Size of the control Valid non-negative integer greater than zerosizes link Sizes of the icons (for

rel="icon")Unordered set of unique space-separated tokens,ASCII case-insensitive, consisting of sizes*

span col; colgroup Number of columns spannedby the element

Valid non-negative integer greater than zero

src audio; embed;iframe; img; input;script; source;track; video

Address of the resource Valid non-empty URL potentially surrounded byspaces

srcdoc iframe A document to render in theiframe

The source of an iframe srcdoc document*

srclang track Language of the text track Valid BCP 47 language tagstart ol Ordinal value of the first item Valid integer

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

12 of 18 3/13/14, 11:32 AM

Page 13: HTML5

Attribute Element(s) Description Valuestep input Granularity to be matched by

the form control's valueValid floating-point number greater than zero, or"any"

style HTML elements Presentational and formattinginstructions

CSS declarations*

tabindex HTML elements Whether the element isfocusable, and the relativeorder of the element for thepurposes of sequential focusnavigation

Valid integer

target a; area Browsing context for hyperlinknavigation

Valid browsing context name or keyword

target base Default browsing context forhyperlink navigation and formsubmission

Valid browsing context name or keyword

target form Browsing context for formsubmission

Valid browsing context name or keyword

title HTML elements Advisory information for theelement

Text

title abbr; dfn Full term or expansion ofabbreviation

Text

title input Description of pattern (whenused with pattern attribute)

Text

title link Title of the link Texttitle link; style Alternative style sheet set

nameText

translate HTML elements Whether the element is to betranslated when the page islocalized

"yes"; "no"

type a; area; link Hint for the type of thereferenced resource

Valid MIME type

type button Type of button "submit"; "reset"; "button"type embed; object;

script; source;style

Type of embedded resource Valid MIME type

type input Type of form control input type keywordtype ol Kind of list marker "1"; "a"; "A"; "i"; "I"typemustmatch object Whether the type attribute and

the Content-Type value needto match for the resource to beused

Boolean attribute

usemap img; object Name of image map to use Valid hash-name reference*value button; option Value to be used for form

submissionText

value data Machine-readable value Text*value input Value of the form control Varies*value li Ordinal value of the list item Valid integervalue meter; progress Current value of the element Valid floating-point numbervalue param Value of parameter Textwidth canvas; embed;

iframe; img; input;object; video

Horizontal dimension Valid non-negative integer

wrap textarea How the value of the formcontrol is to be wrapped forform submission

"soft"; "hard"

An asterisk (*) in a cell indicates that the actual rules are more complicated than indicated in the table above.

List of event handler content attributesAttribute Element(s) Description Value

onabort HTML elements abort event handler Event handler content attributeonafterprint body afterprint event handler for Window object Event handler content attributeonbeforeprint body beforeprint event handler for Window object Event handler content attributeonbeforeunload body beforeunload event handler for Window object Event handler content attributeonblur HTML elements blur event handler Event handler content attribute

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

13 of 18 3/13/14, 11:32 AM

Page 14: HTML5

Attribute Element(s) Description Valueoncancel HTML elements cancel event handler Event handler content attributeoncanplay HTML elements canplay event handler Event handler content attributeoncanplaythrough HTML elements canplaythrough event handler Event handler content attributeonchange HTML elements change event handler Event handler content attributeonclick HTML elements click event handler Event handler content attributeonclose HTML elements close event handler Event handler content attributeoncuechange HTML elements cuechange event handler Event handler content attributeondblclick HTML elements dblclick event handler Event handler content attributeondrag HTML elements drag event handler Event handler content attributeondragend HTML elements dragend event handler Event handler content attributeondragenter HTML elements dragenter event handler Event handler content attributeondragexit HTML elements dragexit event handler Event handler content attributeondragleave HTML elements dragleave event handler Event handler content attributeondragover HTML elements dragover event handler Event handler content attributeondragstart HTML elements dragstart event handler Event handler content attributeondrop HTML elements drop event handler Event handler content attributeondurationchange HTML elements durationchange event handler Event handler content attributeonemptied HTML elements emptied event handler Event handler content attributeonended HTML elements ended event handler Event handler content attributeonerror HTML elements error event handler Event handler content attributeonfocus HTML elements focus event handler Event handler content attributeonhashchange body hashchange event handler for Window object Event handler content attributeoninput HTML elements input event handler Event handler content attributeoninvalid HTML elements invalid event handler Event handler content attributeonkeydown HTML elements keydown event handler Event handler content attributeonkeypress HTML elements keypress event handler Event handler content attributeonkeyup HTML elements keyup event handler Event handler content attributeonload HTML elements load event handler Event handler content attributeonloadeddata HTML elements loadeddata event handler Event handler content attributeonloadedmetadata HTML elements loadedmetadata event handler Event handler content attributeonloadstart HTML elements loadstart event handler Event handler content attributeonmessage body message event handler for Window object Event handler content attributeonmousedown HTML elements mousedown event handler Event handler content attributeonmouseenter HTML elements mouseenter event handler Event handler content attributeonmouseleave HTML elements mouseleave event handler Event handler content attributeonmousemove HTML elements mousemove event handler Event handler content attributeonmouseout HTML elements mouseout event handler Event handler content attributeonmouseover HTML elements mouseover event handler Event handler content attributeonmouseup HTML elements mouseup event handler Event handler content attributeonmousewheel HTML elements mousewheel event handler Event handler content attributeonoffline body offline event handler for Window object Event handler content attributeononline body online event handler for Window object Event handler content attributeonpagehide body pagehide event handler for Window object Event handler content attributeonpageshow body pageshow event handler for Window object Event handler content attributeonpause HTML elements pause event handler Event handler content attributeonplay HTML elements play event handler Event handler content attributeonplaying HTML elements playing event handler Event handler content attributeonpopstate body popstate event handler for Window object Event handler content attributeonprogress HTML elements progress event handler Event handler content attributeonratechange HTML elements ratechange event handler Event handler content attributeonreset HTML elements reset event handler Event handler content attributeonresize HTML elements resize event handler Event handler content attributeonscroll HTML elements scroll event handler Event handler content attributeonseeked HTML elements seeked event handler Event handler content attributeonseeking HTML elements seeking event handler Event handler content attribute

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

14 of 18 3/13/14, 11:32 AM

Page 15: HTML5

Attribute Element(s) Description Valueonselect HTML elements select event handler Event handler content attributeonshow HTML elements show event handler Event handler content attributeonstalled HTML elements stalled event handler Event handler content attributeonstorage body storage event handler for Window object Event handler content attributeonsubmit HTML elements submit event handler Event handler content attributeonsuspend HTML elements suspend event handler Event handler content attributeontimeupdate HTML elements timeupdate event handler Event handler content attributeontoggle HTML elements toggle event handler Event handler content attributeonunload body unload event handler for Window object Event handler content attributeonvolumechange HTML elements volumechange event handler Event handler content attributeonwaiting HTML elements waiting event handler Event handler content attribute

Element Interfaces

This section is non-normative.

List of interfaces for elementsElement(s) Interface(s)a HTMLAnchorElement : HTMLElementabbr HTMLElement

address HTMLElement

area HTMLAreaElement : HTMLElementarticle HTMLElement

aside HTMLElement

audio HTMLAudioElement : HTMLMediaElement : HTMLElementb HTMLElement

base HTMLBaseElement : HTMLElementbdi HTMLElement

bdo HTMLElement

blockquote HTMLQuoteElement : HTMLElementbody HTMLBodyElement : HTMLElementbr HTMLBRElement : HTMLElementbutton HTMLButtonElement : HTMLElementcanvas HTMLCanvasElement : HTMLElementcaption HTMLTableCaptionElement : HTMLElementcite HTMLElement

code HTMLElement

col HTMLTableColElement : HTMLElementcolgroup HTMLTableColElement : HTMLElementdata HTMLDataElement : HTMLElementdatalist HTMLDataListElement : HTMLElementdd HTMLElement

del HTMLModElement : HTMLElementdetails HTMLDetailsElement : HTMLElementdfn HTMLElement

dialog HTMLDialogElement : HTMLElementdiv HTMLDivElement : HTMLElementdl HTMLDListElement : HTMLElementdt HTMLElement

em HTMLElement

embed HTMLEmbedElement : HTMLElementfieldset HTMLFieldSetElement : HTMLElementfigcaption HTMLElement

figure HTMLElement

footer HTMLElement

form HTMLFormElement : HTMLElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

15 of 18 3/13/14, 11:32 AM

Page 16: HTML5

Element(s) Interface(s)h1 HTMLHeadingElement : HTMLElementh2 HTMLHeadingElement : HTMLElementh3 HTMLHeadingElement : HTMLElementh4 HTMLHeadingElement : HTMLElementh5 HTMLHeadingElement : HTMLElementh6 HTMLHeadingElement : HTMLElementhead HTMLHeadElement : HTMLElementheader HTMLElement

hr HTMLHRElement : HTMLElementhtml HTMLHtmlElement : HTMLElementi HTMLElement

iframe HTMLIFrameElement : HTMLElementimg HTMLImageElement : HTMLElementinput HTMLInputElement : HTMLElementins HTMLModElement : HTMLElementkbd HTMLElement

keygen HTMLKeygenElement : HTMLElementlabel HTMLLabelElement : HTMLElementlegend HTMLLegendElement : HTMLElementli HTMLLIElement : HTMLElementlink HTMLLinkElement : HTMLElementmain HTMLElement

map HTMLMapElement : HTMLElementmark HTMLElement

meta HTMLMetaElement : HTMLElementmeter HTMLMeterElement : HTMLElementnav HTMLElement

noscript HTMLElement

object HTMLObjectElement : HTMLElementol HTMLOListElement : HTMLElementoptgroup HTMLOptGroupElement : HTMLElementoption HTMLOptionElement : HTMLElementoutput HTMLOutputElement : HTMLElementp HTMLParagraphElement : HTMLElementparam HTMLParamElement : HTMLElementpre HTMLPreElement : HTMLElementprogress HTMLProgressElement : HTMLElementq HTMLQuoteElement : HTMLElementrb HTMLElement

rp HTMLElement

rt HTMLElement

rtc HTMLElement

ruby HTMLElement

s HTMLElement

samp HTMLElement

script HTMLScriptElement : HTMLElementsection HTMLElement

select HTMLSelectElement : HTMLElementsmall HTMLElement

source HTMLSourceElement : HTMLElementspan HTMLSpanElement : HTMLElementstrong HTMLElement

style HTMLStyleElement : HTMLElementsub HTMLElement

summary HTMLElement

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

16 of 18 3/13/14, 11:32 AM

Page 17: HTML5

Element(s) Interface(s)sup HTMLElement

table HTMLTableElement : HTMLElementtbody HTMLTableSectionElement : HTMLElementtd HTMLTableDataCellElement : HTMLTableCellElement : HTMLElementtemplate HTMLTemplateElement : HTMLElementtextarea HTMLTextAreaElement : HTMLElementtfoot HTMLTableSectionElement : HTMLElementth HTMLTableHeaderCellElement : HTMLTableCellElement : HTMLElementthead HTMLTableSectionElement : HTMLElementtime HTMLTimeElement : HTMLElementtitle HTMLTitleElement : HTMLElementtr HTMLTableRowElement : HTMLElementtrack HTMLTrackElement : HTMLElementu HTMLElement

ul HTMLUListElement : HTMLElementvar HTMLElement

video HTMLVideoElement : HTMLMediaElement : HTMLElementwbr HTMLElement

All Interfaces

This section is non-normative.

Events

This section is non-normative.

List of eventsEvent Interface Description

abort Event Fired at the Window when the download was aborted by the userafterprint Event Fired at the Window after printingbeforeprint Event Fired at the Window before printingbeforeunload BeforeUnloadEvent Fired at the Window when the page is about to be unloaded, in case the page

would like to show a warning promptblur Event Fired at nodes losing focuschange Event Fired at controls when the user commits a value changeclick Event Fired at an element before its activation behavior is runDOMContentLoaded Event Fired at the Document once the parser has finishederror Event Fired at elements when network and script errors occurfocus Event Fired at nodes gaining focushashchange HashChangeEvent Fired at the Window when the fragment identifier part of the document's address

changesinput Event Fired at controls when the user changes the valueinvalid Event Fired at controls during form validation if they do not satisfy their constraintsload Event Fired at the Window when the document has finished loading; fired at an element

containing a resource (e.g. img, embed) when its resource has finished loadingmessage MessageEvent Fired at an object when the object receives a messageoffline Event Fired at the Window when the network connections failsonline Event Fired at the Window when the network connections returnspagehide PageTransitionEvent Fired at the Window when the page's entry in the session history stops being the

current entrypageshow PageTransitionEvent Fired at the Window when the page's entry in the session history becomes the

current entrypopstate PopStateEvent Fired at the Window when the user navigates the session historyreadystatechange Event Fired at the Document when it finishes parsing and again when all its subresources

have finished loadingreset Event Fired at a form element when it is reset

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

17 of 18 3/13/14, 11:32 AM

Page 18: HTML5

Event Interface Descriptionsubmit Event Fired at a form element when it is submittedunload Event Fired at the Window object when the page is going away

Note: See also media element events, application cache events, and drag-and-drop events.

Index — HTML5 http://www.w3.org/TR/html5/index.html#elements-1

18 of 18 3/13/14, 11:32 AM