0% found this document useful (0 votes)
77 views

HTML Tags Ordered Alphabetically

The document lists HTML tags in alphabetical order and by category, providing a description for each tag. Some tags are noted as not being supported in HTML5, and alternatives are suggested. Formatting tags include elements for bold, italic, strikethrough text as well as font specifications. Tags for forms and user input include buttons, text areas, drop-down menus and labels. Frames tags include <frame>, though it is noted as not being supported in HTML5.

Uploaded by

vineethvrr5948
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

HTML Tags Ordered Alphabetically

The document lists HTML tags in alphabetical order and by category, providing a description for each tag. Some tags are noted as not being supported in HTML5, and alternatives are suggested. Formatting tags include elements for bold, italic, strikethrough text as well as font specifications. Tags for forms and user input include buttons, text areas, drop-down menus and labels. Frames tags include <frame>, though it is noted as not being supported in HTML5.

Uploaded by

vineethvrr5948
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

HTML Tags Ordered Alphabetically

= New in HTML5.
Tag Description
<!--...--> Defines a comment
<!DOCTYPE> Defines the oc!ment t"#e
<a> Defines a h"#e$%in&
<a''$> Defines an a''$e(iation
<ac$on"m>
Not s!##o$te in HTML5. )se <a''$> instea.
Defines an ac$on"m
<a$ess> Defines contact info$mation fo$ the a!tho$*owne$ of a oc!ment
<a##%et>
Not s!##o$te in HTML5. )se <o'+ect> instea.
Defines an em'ee a##%et
<a$ea> Defines an a$ea insie an ima,e-ma#
<a$tic%e> Defines an a$tic%e
<asie> Defines content asie f$om the #a,e content
<a!io> Defines so!n content
<'> Defines 'o% te-t
<'ase> .#ecifies the 'ase )/L*ta$,et fo$ a%% $e%ati(e )/Ls in a oc!ment
<'asefont>
Not s!##o$te in HTML5. )se C.. instea.
.#ecifies a efa!%t co%o$0 si1e0 an font fo$ a%% te-t in a oc!ment
<'i>
2so%ates a #a$t of te-t that mi,ht 'e fo$matte in a iffe$ent i$ection
f$om othe$ te-t o!tsie it
<'o> O(e$$ies the c!$$ent te-t i$ection
<'i,>
Not s!##o$te in HTML5. )se C.. instea.
Defines 'i, te-t
<'%oc&3!ote> Defines a section that is 3!ote f$om anothe$ so!$ce
<'o"> Defines the oc!ment4s 'o"
<'$> Defines a sin,%e %ine '$ea&
<'!tton> Defines a c%ic&a'%e '!tton
<can(as> )se to $aw ,$a#hics0 on the f%"0 (ia sc$i#tin, 5!s!a%%" 6a(a.c$i#t7
<ca#tion> Defines a ta'%e ca#tion
<cente$>
Not s!##o$te in HTML5. )se C.. instea.
Defines cente$e te-t
<cite> Defines the tit%e of a wo$&
<coe> Defines a #iece of com#!te$ coe
<co%>
.#ecifies co%!mn #$o#e$ties fo$ each co%!mn within a <co%,$o!#>
e%ement
<co%,$o!#> .#ecifies a ,$o!# of one o$ mo$e co%!mns in a ta'%e fo$ fo$mattin,
<ata%ist> .#ecifies a %ist of #$e-efine o#tions fo$ in#!t cont$o%s
<> Defines a esc$i#tion*(a%!e of a te$m in a esc$i#tion %ist
<e%> Defines te-t that has 'een e%ete f$om a oc!ment
<etai%s> Defines aitiona% etai%s that the !se$ can (iew o$ hie
<fn> Defines a efinition te$m
<ia%o,> Defines a ia%o, 'o- o$ winow
<i$>
Not s!##o$te in HTML5. )se <!%> instea.
Defines a i$ecto$" %ist
<i(> Defines a section in a oc!ment
<%> Defines a esc$i#tion %ist
<t> Defines a te$m*name in a esc$i#tion %ist
<em> Defines em#hasi1e te-t
<em'e> Defines a containe$ fo$ an e-te$na% 5non-HTML7 a##%ication
<fie%set> 8$o!#s $e%ate e%ements in a fo$m
<fi,ca#tion> Defines a ca#tion fo$ a <fi,!$e> e%ement
<fi,!$e> .#ecifies se%f-containe content
<font>
Not s!##o$te in HTML5. )se C.. instea.
Defines font0 co%o$0 an si1e fo$ te-t
<foote$> Defines a foote$ fo$ a oc!ment o$ section
<fo$m> Defines an HTML fo$m fo$ !se$ in#!t
<f$ame>
Not s!##o$te in HTML5.
Defines a winow 5a f$ame7 in a f$ameset
<f$ameset>
Not s!##o$te in HTML5.
Defines a set of f$ames
<h9> to <h:> Defines HTML heain,s
<hea> Defines info$mation a'o!t the oc!ment
<heae$> Defines a heae$ fo$ a oc!ment o$ section
<h$> Defines a thematic chan,e in the content
<htm%> Defines the $oot of an HTML oc!ment
<i> Defines a #a$t of te-t in an a%te$nate (oice o$ moo
<if$ame> Defines an in%ine f$ame
<im,> Defines an ima,e
<in#!t> Defines an in#!t cont$o%
<ins> Defines a te-t that has 'een inse$te into a oc!ment
<&'> Defines &e"'oa$ in#!t
<&e",en> Defines a &e"-#ai$ ,ene$ato$ fie% 5fo$ fo$ms7
<%a'e%> Defines a %a'e% fo$ an <in#!t> e%ement
<%e,en> Defines a ca#tion fo$ a <fie%set> e%ement
<%i> Defines a %ist item
<%in&>
Defines the $e%ationshi# 'etween a oc!ment an an e-te$na% $eso!$ce
5most !se to %in& to st"%e sheets7
<main> .#ecifies the main content of a oc!ment
<ma#> Defines a c%ient-sie ima,e-ma#
<ma$&> Defines ma$&e*hi,h%i,hte te-t
<men!> Defines a %ist*men! of commans
<men!item>
Defines a comman*men! item that the !se$ can in(o&e f$om a #o#!#
men!
<meta> Defines metaata a'o!t an HTML oc!ment
<mete$> Defines a sca%a$ meas!$ement within a &nown $an,e 5a ,a!,e7
<na(> Defines na(i,ation %in&s
<nof$ames>
Not s!##o$te in HTML5.
Defines an a%te$nate content fo$ !se$s that o not s!##o$t f$ames
<nosc$i#t>
Defines an a%te$nate content fo$ !se$s that o not s!##o$t c%ient-sie
sc$i#ts
<o'+ect> Defines an em'ee o'+ect
<o%> Defines an o$e$e %ist
<o#t,$o!#> Defines a ,$o!# of $e%ate o#tions in a $o#-own %ist
<o#tion> Defines an o#tion in a $o#-own %ist
<o!t#!t> Defines the $es!%t of a ca%c!%ation
<#> Defines a #a$a,$a#h
<#a$am> Defines a #a$amete$ fo$ an o'+ect
<#$e> Defines #$efo$matte te-t
<#$o,$ess> /e#$esents the #$o,$ess of a tas&
<3> Defines a sho$t 3!otation
<$#> Defines what to show in '$owse$s that o not s!##o$t $!'" annotations
<$t>
Defines an e-#%anation*#$on!nciation of cha$acte$s 5fo$ East ;sian
t"#o,$a#h"7
<$!'"> Defines a $!'" annotation 5fo$ East ;sian t"#o,$a#h"7
<s> Defines te-t that is no %on,e$ co$$ect
<sam#> Defines sam#%e o!t#!t f$om a com#!te$ #$o,$am
<sc$i#t> Defines a c%ient-sie sc$i#t
<section> Defines a section in a oc!ment
<se%ect> Defines a $o#-own %ist
<sma%%> Defines sma%%e$ te-t
<so!$ce>
Defines m!%ti#%e meia $eso!$ces fo$ meia e%ements 5<(ieo> an
<a!io>7
<s#an> Defines a section in a oc!ment
<st$i&e>
Not s!##o$te in HTML5. )se <e%> instea.
Defines st$i&eth$o!,h te-t
<st$on,> Defines im#o$tant te-t
<st"%e> Defines st"%e info$mation fo$ a oc!ment
<s!'> Defines s!'sc$i#te te-t
<s!mma$"> Defines a (isi'%e heain, fo$ a <etai%s> e%ement
<s!#> Defines s!#e$sc$i#te te-t
<ta'%e> Defines a ta'%e
<t'o"> 8$o!#s the 'o" content in a ta'%e
<t> Defines a ce%% in a ta'%e
<te-ta$ea> Defines a m!%ti%ine in#!t cont$o% 5te-t a$ea7
<tfoot> 8$o!#s the foote$ content in a ta'%e
<th> Defines a heae$ ce%% in a ta'%e
<thea> 8$o!#s the heae$ content in a ta'%e
<time> Defines a ate*time
<tit%e> Defines a tit%e fo$ the oc!ment
<t$> Defines a $ow in a ta'%e
<t$ac&> Defines te-t t$ac&s fo$ meia e%ements 5<(ieo> an <a!io>7
<tt>
Not s!##o$te in HTML5. )se C.. instea.
Defines te%et"#e te-t
<!> Defines te-t that sho!% 'e st"%istica%%" iffe$ent f$om no$ma% te-t
<!%> Defines an !no$e$e %ist
<(a$> Defines a (a$ia'%e
<(ieo> Defines a (ieo o$ mo(ie
<w'$> Defines a #ossi'%e %ine-'$ea&
HTML Tags Ordered by Category
= New in HTML5.
Basic Tags
Tag Description
<!DOCTYPE> Defines the oc!ment t"#e
<htm%> Defines an HTML oc!ment
<tit%e> Defines a tit%e fo$ the oc!ment
<'o"> Defines the oc!ment4s 'o"
<h9> to <h:> Defines HTML heain,s
<#> Defines a #a$a,$a#h
<'$> 2nse$ts a sin,%e %ine '$ea&
<h$> Defines a thematic chan,e in the content
<!--...--> Defines a comment
Formatting
Tag Description
<ac$on"m>
Not s!##o$te in HTML5. )se <a''$> instea.
Defines an ac$on"m
<a''$> Defines an a''$e(iation
<a$ess> Defines contact info$mation fo$ the a!tho$*owne$ of a oc!ment*a$tic%e
<'> Defines 'o% te-t
<'i>
2so%ates a #a$t of te-t that mi,ht 'e fo$matte in a iffe$ent i$ection f$om
othe$ te-t o!tsie it
<'o> O(e$$ies the c!$$ent te-t i$ection
<'i,>
Not s!##o$te in HTML5. )se C.. instea.
Defines 'i, te-t
<'%oc&3!ote> Defines a section that is 3!ote f$om anothe$ so!$ce
<cente$>
Not s!##o$te in HTML5. )se C.. instea.
Defines cente$e te-t
<cite> Defines the tit%e of a wo$&
<coe> Defines a #iece of com#!te$ coe
<e%> Defines te-t that has 'een e%ete f$om a oc!ment
<fn> Defines a efinition te$m
<em> Defines em#hasi1e te-t
<font>
Not s!##o$te in HTML5. )se C.. instea.
Defines font0 co%o$0 an si1e fo$ te-t
<i> Defines a #a$t of te-t in an a%te$nate (oice o$ moo
<ins> Defines a te-t that has 'een inse$te into a oc!ment
<&'> Defines &e"'oa$ in#!t
<ma$&> Defines ma$&e*hi,h%i,hte te-t
<mete$> Defines a sca%a$ meas!$ement within a &nown $an,e 5a ,a!,e7
<#$e> Defines #$efo$matte te-t
<#$o,$ess> /e#$esents the #$o,$ess of a tas&
<3> Defines a sho$t 3!otation
<$#> Defines what to show in '$owse$s that o not s!##o$t $!'" annotations
<$t>
Defines an e-#%anation*#$on!nciation of cha$acte$s 5fo$ East ;sian
t"#o,$a#h"7
<$!'"> Defines a $!'" annotation 5fo$ East ;sian t"#o,$a#h"7
<s> Defines te-t that is no %on,e$ co$$ect
<sam#> Defines sam#%e o!t#!t f$om a com#!te$ #$o,$am
<sma%%> Defines sma%%e$ te-t
<st$i&e>
Not s!##o$te in HTML5. )se <e%> instea.
Defines st$i&eth$o!,h te-t
<st$on,> Defines im#o$tant te-t
<s!'> Defines s!'sc$i#te te-t
<s!#> Defines s!#e$sc$i#te te-t
<time> Defines a ate*time
<tt>
Not s!##o$te in HTML5. )se C.. instea.
Defines te%et"#e te-t
<!> Defines te-t that sho!% 'e st"%istica%%" iffe$ent f$om no$ma% te-t
<(a$> Defines a (a$ia'%e
<w'$> Defines a #ossi'%e %ine-'$ea&
Forms and Input
Tag Description
<fo$m> Defines an HTML fo$m fo$ !se$ in#!t
<in#!t> Defines an in#!t cont$o%
<te-ta$ea> Defines a m!%ti%ine in#!t cont$o% 5te-t a$ea7
<'!tton> Defines a c%ic&a'%e '!tton
<se%ect> Defines a $o#-own %ist
<o#t,$o!#> Defines a ,$o!# of $e%ate o#tions in a $o#-own %ist
<o#tion> Defines an o#tion in a $o#-own %ist
<%a'e%> Defines a %a'e% fo$ an <in#!t> e%ement
<fie%set> 8$o!#s $e%ate e%ements in a fo$m
<%e,en> Defines a ca#tion fo$ a <fie%set> e%ement
<ata%ist> .#ecifies a %ist of #$e-efine o#tions fo$ in#!t cont$o%s
<&e",en> Defines a &e"-#ai$ ,ene$ato$ fie% 5fo$ fo$ms7
<o!t#!t> Defines the $es!%t of a ca%c!%ation
Frames
Tag Description
<f$ame>
Not s!##o$te in HTML5.
Defines a winow 5a f$ame7 in a f$ameset
<f$ameset>
Not s!##o$te in HTML5.
Defines a set of f$ames
<nof$ames>
Not s!##o$te in HTML5.
Defines an a%te$nate content fo$ !se$s that o not s!##o$t f$ames
<if$ame> Defines an in%ine f$ame
Images
Tag Description
<im,> Defines an ima,e
<ma#> Defines a c%ient-sie ima,e-ma#
<a$ea> Defines an a$ea insie an ima,e-ma#
<can(as> )se to $aw ,$a#hics0 on the f%"0 (ia sc$i#tin, 5!s!a%%" 6a(a.c$i#t7
<fi,ca#tion> Defines a ca#tion fo$ a <fi,!$e> e%ement
<fi,!$e> .#ecifies se%f-containe content
Audio / ideo
Tag Description
<a!io> Defines so!n content
<so!$ce> Defines m!%ti#%e meia $eso!$ces fo$ meia e%ements 5<(ieo> an <a!io>7
<t$ac&> Defines te-t t$ac&s fo$ meia e%ements 5<(ieo> an <a!io>7
<(ieo> Defines a (ieo o$ mo(ie
Lin!s
Tag Description
<a> Defines a h"#e$%in&
<%in&>
Defines the $e%ationshi# 'etween a oc!ment an an e-te$na% $eso!$ce 5most
!se to %in& to st"%e sheets7
<na(> Defines na(i,ation %in&s
Lists
Tag Description
<!%> Defines an !no$e$e %ist
<o%> Defines an o$e$e %ist
<%i> Defines a %ist item
<i$>
Not s!##o$te in HTML5. )se <!%> instea.
Defines a i$ecto$" %ist
<%> Defines a esc$i#tion %ist
<t> Defines a te$m*name in a esc$i#tion %ist
<> Defines a esc$i#tion of a te$m*name in a esc$i#tion %ist
<men!> Defines a %ist*men! of commans
<men!item> Defines a comman*men! item that the !se$ can in(o&e f$om a #o#!# men!
Tables
Tag Description
<ta'%e> Defines a ta'%e
<ca#tion> Defines a ta'%e ca#tion
<th> Defines a heae$ ce%% in a ta'%e
<t$> Defines a $ow in a ta'%e
<t> Defines a ce%% in a ta'%e
<thea> 8$o!#s the heae$ content in a ta'%e
<t'o"> 8$o!#s the 'o" content in a ta'%e
<tfoot> 8$o!#s the foote$ content in a ta'%e
<co%> .#ecifies co%!mn #$o#e$ties fo$ each co%!mn within a <co%,$o!#> e%ement
<co%,$o!#> .#ecifies a ,$o!# of one o$ mo$e co%!mns in a ta'%e fo$ fo$mattin,
"tyles and "emantics
Tag Description
<st"%e> Defines st"%e info$mation fo$ a oc!ment
<i(> Defines a section in a oc!ment
<s#an> Defines a section in a oc!ment
<heae$> Defines a heae$ fo$ a oc!ment o$ section
<foote$> Defines a foote$ fo$ a oc!ment o$ section
<section> Defines a section in a oc!ment
<a$tic%e> Defines an a$tic%e
<asie> Defines content asie f$om the #a,e content
<etai%s> Defines aitiona% etai%s that the !se$ can (iew o$ hie
<ia%o,> Defines a ia%o, 'o- o$ winow
<s!mma$"> Defines a (isi'%e heain, fo$ a <etai%s> e%ement
Meta In#o
Tag Description
<hea> Defines info$mation a'o!t the oc!ment
<meta> Defines metaata a'o!t an HTML oc!ment
<'ase> .#ecifies the 'ase )/L*ta$,et fo$ a%% $e%ati(e )/Ls in a oc!ment
<'asefont>
Not s!##o$te in HTML5. )se C.. instea.
.#ecifies a efa!%t co%o$0 si1e0 an font fo$ a%% te-t in a oc!ment
$rogramming
Tag Description
<sc$i#t> Defines a c%ient-sie sc$i#t
<nosc$i#t> Defines an a%te$nate content fo$ !se$s that o not s!##o$t c%ient-sie sc$i#ts
<a##%et>
Not s!##o$te in HTML5. )se <o'+ect> instea.
Defines an em'ee a##%et
<em'e> Defines a containe$ fo$ an e-te$na% 5non-HTML7 a##%ication
<o'+ect> Defines an em'ee o'+ect
<#a$am> Defines a #a$amete$ fo$ an o'+ect
HTML %lobal Attributes
= ;tt$i'!te ae in HTML5.
Attribute Description
access&e" .#ecifies a sho$tc!t &e" to acti(ate*foc!s an e%ement
c%ass
.#ecifies one o$ mo$e c%assnames fo$ an e%ement 5$efe$s to a c%ass in a
st"%e sheet7
contenteita'%e .#ecifies whethe$ the content of an e%ement is eita'%e o$ not
conte-tmen!
.#ecifies a conte-t men! fo$ an e%ement. The conte-t men! a##ea$s
when a !se$ $i,ht-c%ic&s on the e%ement
ata-< )se to sto$e c!stom ata #$i(ate to the #a,e o$ a##%ication
i$ .#ecifies the te-t i$ection fo$ the content in an e%ement
$a,,a'%e .#ecifies whethe$ an e%ement is $a,,a'%e o$ not
$o#1one
.#ecifies whethe$ the $a,,e ata is co#ie0 mo(e0 o$ %in&e0 when
$o##e
hien .#ecifies that an e%ement is not "et0 o$ is no %on,e$0 $e%e(ant
i .#ecifies a !ni3!e i fo$ an e%ement
%an, .#ecifies the %an,!a,e of the e%ement4s content
s#e%%chec&
.#ecifies whethe$ the e%ement is to ha(e its s#e%%in, an ,$amma$
chec&e o$ not
st"%e .#ecifies an in%ine C.. st"%e fo$ an e%ement
ta'ine- .#ecifies the ta''in, o$e$ of an e%ement
tit%e .#ecifies e-t$a info$mation a'o!t an e%ement
t$ans%ate .#ecifies whethe$ the content of an e%ement sho!% 'e t$ans%ate o$ not
&indo' ()ent Attributes
E(ents t$i,,e$e fo$ the winow o'+ect 5a##%ies to the <'o"> ta,7=
Attribute alue Description
onafte$#$int script .c$i#t to 'e $!n afte$ the oc!ment is #$inte
on'efo$e#$int script .c$i#t to 'e $!n 'efo$e the oc!ment is #$inte
on'efo$e!n%oa script .c$i#t to 'e $!n 'efo$e the oc!ment is !n%oae
one$$o$ script .c$i#t to 'e $!n when an e$$o$ occ!$
onhaschan,e script .c$i#t to 'e $!n when the oc!ment has chan,e
on%oa script >i$es afte$ the #a,e is finishe %oain,
onmessa,e script .c$i#t to 'e $!n when the messa,e is t$i,,e$e
onoff%ine script .c$i#t to 'e $!n when the oc!ment ,oes off%ine
onon%ine script .c$i#t to 'e $!n when the oc!ment comes on%ine
on#a,ehie script .c$i#t to 'e $!n when the winow is hien
on#a,eshow script .c$i#t to 'e $!n when the winow 'ecomes (isi'%e
on#o#state script .c$i#t to 'e $!n when the winow4s histo$" chan,es
on$eo script .c$i#t to 'e $!n when the oc!ment #e$fo$ms a $eo
on$esi1e script >i$es when the '$owse$ winow is $esi1e
onsto$a,e script .c$i#t to 'e $!n when a ?e' .to$a,e a$ea is !#ate
on!no script .c$i#t to 'e $!n when the oc!ment #e$fo$ms an !no
on!n%oa script
>i$es once a #a,e has !n%oae 5o$ the '$owse$ winow has
'een c%ose7
Form ()ents
E(ents t$i,,e$e '" actions insie a HTML fo$m 5a##%ies to a%most a%% HTML e%ements0 '!t is
most !se in fo$m e%ements7=
Attribute alue Description
on'%!$ script >i$es the moment that the e%ement %oses foc!s
onchan,e script >i$es the moment when the (a%!e of the e%ement is chan,e
onconte-tmen! script .c$i#t to 'e $!n when a conte-t men! is t$i,,e$e
onfoc!s script >i$es the moment when the e%ement ,ets foc!s
onfo$mchan,e script .c$i#t to 'e $!n when a fo$m chan,es
onfo$min#!t script .c$i#t to 'e $!n when a fo$m ,ets !se$ in#!t
onin#!t script .c$i#t to 'e $!n when an e%ement ,ets !se$ in#!t
onin(a%i script .c$i#t to 'e $!n when an e%ement is in(a%i
on$eset script
>i$es when the /eset '!tton in a fo$m is c%ic&e
Not s!##o$te in HTML5
onse%ect script >i$es afte$ some te-t has 'een se%ecte in an e%ement
ons!'mit script >i$es when a fo$m is s!'mitte
*eyboard ()ents
Attribute alue Description
on&e"own script >i$es when a !se$ is #$essin, a &e"
on&e"#$ess script >i$es when a !se$ #$esses a &e"
on&e"!# script >i$es when a !se$ $e%eases a &e"
Mouse ()ents
E(ents t$i,,e$e '" a mo!se0 o$ simi%a$ !se$ actions=
Attribute alue Description
onc%ic& script >i$es on a mo!se c%ic& on the e%ement
on'%c%ic& script >i$es on a mo!se o!'%e-c%ic& on the e%ement
on$a, script .c$i#t to 'e $!n when an e%ement is $a,,e
on$a,en script .c$i#t to 'e $!n at the en of a $a, o#e$ation
on$a,ente$ script
.c$i#t to 'e $!n when an e%ement has 'een $a,,e to a (a%i
$o# ta$,et
on$a,%ea(e script .c$i#t to 'e $!n when an e%ement %ea(es a (a%i $o# ta$,et
on$a,o(e$ script
.c$i#t to 'e $!n when an e%ement is 'ein, $a,,e o(e$ a
(a%i $o# ta$,et
on$a,sta$t script .c$i#t to 'e $!n at the sta$t of a $a, o#e$ation
on$o# script .c$i#t to 'e $!n when $a,,e e%ement is 'ein, $o##e
onmo!seown script >i$es when a mo!se '!tton is #$esse own on an e%ement
onmo!semo(e script >i$es when the mo!se #ointe$ mo(es o(e$ an e%ement
onmo!seo!t script >i$es when the mo!se #ointe$ mo(es o!t of an e%ement
onmo!seo(e$ script >i$es when the mo!se #ointe$ mo(es o(e$ an e%ement
onmo!se!# script >i$es when a mo!se '!tton is $e%ease o(e$ an e%ement
onmo!sewhee% script .c$i#t to 'e $!n when the mo!se whee% is 'ein, $otate
onsc$o%% script .c$i#t to 'e $!n when an e%ement4s sc$o%%'a$ is 'ein, sc$o%%e
Media ()ents
E(ents t$i,,e$e '" meias %i&e (ieos0 ima,es an a!io 5a##%ies to a%% HTML e%ements0 '!t is
most common in meia e%ements0 %i&e <a!io>0 <em'e>0 <im,>0 <o'+ect>0 an <(ieo>7=
Attribute alue Description
ona'o$t script .c$i#t to 'e $!n on a'o$t
oncan#%a" script
.c$i#t to 'e $!n when a fi%e is $ea" to sta$t #%a"in, 5when it
has '!ffe$e eno!,h to 'e,in7
oncan#%a"th$o!,h script
.c$i#t to 'e $!n when a fi%e can 'e #%a"e a%% the wa" to the
en witho!t #a!sin, fo$ '!ffe$in,
on!$ationchan,e script .c$i#t to 'e $!n when the %en,th of the meia chan,es
onem#tie script
.c$i#t to 'e $!n when somethin, 'a ha##ens an the fi%e is
s!en%" !na(ai%a'%e 5%i&e !ne-#ecte%" isconnects7
onene script
.c$i#t to 'e $!n when the meia has $each the en 5a !sef!%
e(ent fo$ messa,es %i&e @than&s fo$ %istenin,@7
one$$o$ script
.c$i#t to 'e $!n when an e$$o$ occ!$s when the fi%e is 'ein,
%oae
on%oaeata script .c$i#t to 'e $!n when meia ata is %oae
on%oaemetaata script
.c$i#t to 'e $!n when meta ata 5%i&e imensions an
!$ation7 a$e %oae
on%oasta$t script
.c$i#t to 'e $!n +!st as the fi%e 'e,ins to %oa 'efo$e an"thin,
is act!a%%" %oae
on#a!se script
.c$i#t to 'e $!n when the meia is #a!se eithe$ '" the !se$
o$ #$o,$ammatica%%"
on#%a" script .c$i#t to 'e $!n when the meia is $ea" to sta$t #%a"in,
on#%a"in, script .c$i#t to 'e $!n when the meia act!a%%" has sta$te #%a"in,
on#$o,$ess script
.c$i#t to 'e $!n when the '$owse$ is in the #$ocess of ,ettin,
the meia ata
on$atechan,e script
.c$i#t to 'e $!n each time the #%a"'ac& $ate chan,es 5%i&e
when a !se$ switches to a s%ow motion o$ fast fo$wa$ moe7
on$ea"statechan,e script
.c$i#t to 'e $!n each time the $ea" state chan,es 5the $ea"
state t$ac&s the state of the meia ata7
onsee&e script
.c$i#t to 'e $!n when the see&in, att$i'!te is set to fa%se
inicatin, that see&in, has ene
onsee&in, script
.c$i#t to 'e $!n when the see&in, att$i'!te is set to t$!e
inicatin, that see&in, is acti(e
onsta%%e script
.c$i#t to 'e $!n when the '$owse$ is !na'%e to fetch the
meia ata fo$ whate(e$ $eason
ons!s#en script
.c$i#t to 'e $!n when fetchin, the meia ata is sto##e
'efo$e it is com#%ete%" %oae fo$ whate(e$ $eason
ontime!#ate script
.c$i#t to 'e $!n when the #%a"in, #osition has chan,e 5%i&e
when the !se$ fast fo$wa$s to a iffe$ent #oint in the meia7
on(o%!mechan,e script
.c$i#t to 'e $!n each time the (o%!me is chan,e which
5inc%!es settin, the (o%!me to @m!te@7
onwaitin, script
.c$i#t to 'e $!n when the meia has #a!se '!t is e-#ecte to
$es!me 5%i&e when the meia #a!ses to '!ffe$ mo$e ata7
Description
The HTML5 <can(as> ta, is !se to $aw ,$a#hics0 on the f%"0 (ia sc$i#tin, 5!s!a%%" 6a(a.c$i#t7.
Howe(e$0 the <can(as> e%ement has no $awin, a'i%ities of its own 5it is on%" a containe$ fo$
,$a#hics7 - "o! m!st !se a sc$i#t to act!a%%" $aw the ,$a#hics.
The ,etConte-t57 metho $et!$ns an o'+ect that #$o(ies methos an #$o#e$ties fo$ $awin, on
the can(as.
This $efe$ence wi%% co(e$ the #$o#e$ties an methos of the ,etConte-t5@A@7 o'+ect0 which can
'e !se to $aw te-t0 %ines0 'o-es0 ci$c%es0 an mo$e - on the can(as.
Bro'ser "upport
2nte$net E-#%o$e$ B0 >i$efo-0 O#e$a0 Ch$ome0 an .afa$i s!##o$t <can(as> an its #$o#e$ties an
methos.
+ote, 2nte$net E-#%o$e$ C an ea$%ie$ (e$sions0 o not s!##o$t the <can(as> e%ement.
Colors- "tyles- and "hado's
$roperty Description
fi%%.t"%e .ets o$ $et!$ns the co%o$0 ,$aient0 o$ #atte$n !se to fi%% the $awin,
st$o&e.t"%e .ets o$ $et!$ns the co%o$0 ,$aient0 o$ #atte$n !se fo$ st$o&es
shaowCo%o$ .ets o$ $et!$ns the co%o$ to !se fo$ shaows
shaowD%!$ .ets o$ $et!$ns the '%!$ %e(e% fo$ shaows
shaowOffsetE .ets o$ $et!$ns the ho$i1onta% istance of the shaow f$om the sha#e
shaowOffsetY .ets o$ $et!$ns the (e$tica% istance of the shaow f$om the sha#e
Method Description
c$eateLinea$8$aient57 C$eates a %inea$ ,$aient 5to !se on can(as content7
c$eatePatte$n57 /e#eats a s#ecifie e%ement in the s#ecifie i$ection
c$eate/aia%8$aient57 C$eates a $aia%*ci$c!%a$ ,$aient 5to !se on can(as content7
aCo%o$.to#57 .#ecifies the co%o$s an sto# #ositions in a ,$aient o'+ect
Line "tyles
$roperty Description
%ineCa# .ets o$ $et!$ns the st"%e of the en ca#s fo$ a %ine
%ine6oin .ets o$ $et!$ns the t"#e of co$ne$ c$eate0 when two %ines meet
%ine?ith .ets o$ $et!$ns the c!$$ent %ine with
mite$Limit .ets o$ $et!$ns the ma-im!m mite$ %en,th
.ectangles
Method Description
$ect57 C$eates a $ectan,%e
fi%%/ect57 D$aws a @fi%%e@ $ectan,%e
st$o&e/ect57 D$aws a $ectan,%e 5no fi%%7
c%ea$/ect57 C%ea$s the s#ecifie #i-e%s within a ,i(en $ectan,%e
$aths
Method Description
fi%%57 >i%%s the c!$$ent $awin, 5#ath7
st$o&e57 ;ct!a%%" $aws the #ath "o! ha(e efine
'e,inPath57 De,ins a #ath0 o$ $esets the c!$$ent #ath
mo(eTo57
Mo(es the #ath to the s#ecifie #oint in the can(as0 witho!t c$eatin, a
%ine
c%osePath57 C$eates a #ath f$om the c!$$ent #oint 'ac& to the sta$tin, #oint
%ineTo57
;s a new #oint an c$eates a %ine f$om that #oint to the %ast s#ecifie
#oint in the can(as
c%i#57 C%i#s a $e,ion of an" sha#e an si1e f$om the o$i,ina% can(as
3!a$aticC!$(eTo57 C$eates a 3!a$atic DF1ie$ c!$(e
'e1ie$C!$(eTo57 C$eates a c!'ic DF1ie$ c!$(e
a$c57 C$eates an a$c*c!$(e 5!se to c$eate ci$c%es0 o$ #a$ts of ci$c%es7
a$cTo57 C$eates an a$c*c!$(e 'etween two tan,ents
isPoint2nPath57 /et!$ns t$!e if the s#ecifie #oint is in the c!$$ent #ath0 othe$wise fa%se
Trans#ormations
Method Description
sca%e57 .ca%es the c!$$ent $awin, 'i,,e$ o$ sma%%e$
$otate57 /otates the c!$$ent $awin,
t$ans%ate57 /ema#s the 5G0G7 #osition on the can(as
t$ansfo$m57 /e#%aces the c!$$ent t$ansfo$mation mat$i- fo$ the $awin,
setT$ansfo$m57
/esets the c!$$ent t$ansfo$m to the ientit" mat$i-. Then $!ns
t$ansfo$m57
Te/t
$roperty Description
font .ets o$ $et!$ns the c!$$ent font #$o#e$ties fo$ te-t content
te-t;%i,n .ets o$ $et!$ns the c!$$ent a%i,nment fo$ te-t content
te-tDase%ine .ets o$ $et!$ns the c!$$ent te-t 'ase%ine !se when $awin, te-t
Method Description
fi%%Te-t57 D$aws @fi%%e@ te-t on the can(as
st$o&eTe-t57 D$aws te-t on the can(as 5no fi%%7
meas!$eTe-t57 /et!$ns an o'+ect that contains the with of the s#ecifie te-t
Image Dra'ing
Method Description
$aw2ma,e57 D$aws an ima,e0 can(as0 o$ (ieo onto the can(as
$i/el Manipulation
$roperty Description
with /et!$ns the with of an 2ma,eData o'+ect
hei,ht /et!$ns the hei,ht of an 2ma,eData o'+ect
ata
/et!$ns an o'+ect that contains ima,e ata of a s#ecifie 2ma,eData
o'+ect
Method Description
c$eate2ma,eData57 C$eates a new0 '%an& 2ma,eData o'+ect
,et2ma,eData57
/et!$ns an 2ma,eData o'+ect that co#ies the #i-e% ata fo$ the s#ecifie
$ectan,%e on a can(as
#!t2ma,eData57
P!ts the ima,e ata 5f$om a s#ecifie 2ma,eData o'+ect7 'ac& onto the
can(as
Compositing
$roperty Description
,%o'a%;%#ha .ets o$ $et!$ns the c!$$ent a%#ha o$ t$ans#a$enc" (a%!e of the $awin,
,%o'a%Com#ositeO#e$ation .ets o$ $et!$ns how a new ima,e a$e $awn onto an e-istin, ima,e
Other
Method Description
sa(e57 .a(es the state of the c!$$ent conte-t
$esto$e57 /et!$ns #$e(io!s%" sa(e #ath state an att$i'!tes
c$eateE(ent57
,etConte-t57
toData)/L57
HTML Audio/ideo Methods
Method Description
aTe-tT$ac&57 ;s a new te-t t$ac& to the a!io*(ieo
canP%a"T"#e57 Chec&s if the '$owse$ can #%a" the s#ecifie a!io*(ieo t"#e
%oa57 /e-%oas the a!io*(ieo e%ement
#%a"57 .ta$ts #%a"in, the a!io*(ieo
#a!se57 Pa!ses the c!$$ent%" #%a"in, a!io*(ieo
HTML Audio/ideo $roperties
$roperty Description
a!ioT$ac&s /et!$ns an ;!ioT$ac&List o'+ect $e#$esentin, a(ai%a'%e a!io t$ac&s
a!to#%a"
.ets o$ $et!$ns if the a!io*(ieo sho!% sta$t #%a"in, as soon as it is
%oae
'!ffe$e
/et!$ns a Time/an,es o'+ect $e#$esentin, the '!ffe$e #a$ts of the
a!io*(ieo
cont$o%%e$
/et!$ns the MeiaCont$o%%e$ o'+ect $e#$esentin, the c!$$ent meia
cont$o%%e$ of the a!io*(ieo
cont$o%s
.ets o$ $et!$ns if the a!io*(ieo sho!% is#%a" cont$o%s 5%i&e
#%a"*#a!se etc.7
c$ossO$i,in .ets o$ $et!$ns the CO/. settin,s of the a!io*(ieo
c!$$ent.$c /et!$ns the )/L of the c!$$ent a!io*(ieo
c!$$entTime
.ets o$ $et!$ns the c!$$ent #%a"'ac& #osition in the a!io*(ieo 5in
secons7
efa!%tM!te .ets o$ $et!$ns if the a!io*(ieo is m!te '" efa!%t
efa!%tP%a"'ac&/ate .ets o$ $et!$ns the efa!%t s#ee of the a!io*(ieo #%a"'ac&
!$ation /et!$ns the %en,th of the c!$$ent a!io*(ieo 5in secons7
ene /et!$ns if the #%a"'ac& of the a!io*(ieo has ene o$ not
e$$o$
/et!$ns a MeiaE$$o$ o'+ect $e#$esentin, the e$$o$ state of the
a!io*(ieo
%oo# .ets o$ $et!$ns if the a!io*(ieo sho!% sta$t o(e$ a,ain when finishe
meia8$o!#
.ets o$ $et!$ns the ,$o!# the a!io*(ieo 'e%on,s to 5!se to %in&
m!%ti#%e a!io*(ieo e%ements7
m!te .ets o$ $et!$ns if the a!io*(ieo is m!te o$ not
netwo$&.tate /et!$ns the c!$$ent netwo$& state of the a!io*(ieo
#a!se .ets o$ $et!$ns if the a!io*(ieo is #a!se o$ not
#%a"'ac&/ate .ets o$ $et!$ns the s#ee of the a!io*(ieo #%a"'ac&
#%a"e
/et!$ns a Time/an,es o'+ect $e#$esentin, the #%a"e #a$ts of the
a!io*(ieo
#$e%oa .ets o$ $et!$ns if the a!io*(ieo sho!% 'e %oae when the #a,e %oas
$ea".tate /et!$ns the c!$$ent $ea" state of the a!io*(ieo
see&a'%e
/et!$ns a Time/an,es o'+ect $e#$esentin, the see&a'%e #a$ts of the
a!io*(ieo
see&in, /et!$ns if the !se$ is c!$$ent%" see&in, in the a!io*(ieo
s$c .ets o$ $et!$ns the c!$$ent so!$ce of the a!io*(ieo e%ement
sta$tDate /et!$ns a Date o'+ect $e#$esentin, the c!$$ent time offset
te-tT$ac&s /et!$ns a Te-tT$ac&List o'+ect $e#$esentin, the a(ai%a'%e te-t t$ac&s
(ieoT$ac&s /et!$ns a HieoT$ac&List o'+ect $e#$esentin, the a(ai%a'%e (ieo t$ac&s
(o%!me .ets o$ $et!$ns the (o%!me of the a!io*(ieo
HTML Audio/ideo ()ents
()ent Description
a'o$t >i$es when the %oain, of an a!io*(ieo is a'o$te
can#%a" >i$es when the '$owse$ can sta$t #%a"in, the a!io*(ieo
can#%a"th$o!,h
>i$es when the '$owse$ can #%a" th$o!,h the a!io*(ieo witho!t
sto##in, fo$ '!ffe$in,
!$ationchan,e >i$es when the !$ation of the a!io*(ieo is chan,e
em#tie >i$es when the c!$$ent #%a"%ist is em#t"
ene >i$es when the c!$$ent #%a"%ist is ene
e$$o$ >i$es when an e$$o$ occ!$$e !$in, the %oain, of an a!io*(ieo
%oaeata >i$es when the '$owse$ has %oae the c!$$ent f$ame of the a!io*(ieo
%oaemetaata >i$es when the '$owse$ has %oae meta ata fo$ the a!io*(ieo
%oasta$t >i$es when the '$owse$ sta$ts %oo&in, fo$ the a!io*(ieo
#a!se >i$es when the a!io*(ieo has 'een #a!se
#%a" >i$es when the a!io*(ieo has 'een sta$te o$ is no %on,e$ #a!se
#%a"in,
>i$es when the a!io*(ieo is $ea" to #%a" afte$ ha(in, 'een #a!se o$
sto##e fo$ '!ffe$in,
#$o,$ess >i$es when the '$owse$ is own%oain, the a!io*(ieo
$atechan,e >i$es when the #%a"in, s#ee of the a!io*(ieo is chan,e
see&e
>i$es when the !se$ is finishe mo(in,*s&i##in, to a new #osition in the
a!io*(ieo
see&in,
>i$es when the !se$ sta$ts mo(in,*s&i##in, to a new #osition in the
a!io*(ieo
sta%%e
>i$es when the '$owse$ is t$"in, to ,et meia ata0 '!t ata is not
a(ai%a'%e
s!s#en >i$es when the '$owse$ is intentiona%%" not ,ettin, meia ata
time!#ate >i$es when the c!$$ent #%a"'ac& #osition has chan,e
(o%!mechan,e >i$es when the (o%!me has 'een chan,e
waitin, >i$es when the (ieo sto#s 'eca!se it nees to '!ffe$ the ne-t f$ame

You might also like