HTML Reference - (HTML5 Compliant

)
« W3Schools Home Next Reference »

Ordered Alphabet call!
New " Ne# ta$s n HTML%&
Tag Description

'(--&&&--) '(*O+T,-.) 'a) 'abbr) 'acron!m)

*ef nes a comment *ef nes the doc/ment t!pe *ef nes a h!perl n0 *ef nes an abbre1 at on Not s/pported n HTML%& 2se 'abbr) nstead& *ef nes an acron!m *ef nes contact nformat on for the a/thor3o#ner of a doc/ment Not s/pported n HTML%& 2se 'ob4ect) nstead& *ef nes an embedded applet *ef nes an area ns de an ma$e-map *ef nes an art cle *ef nes content as de from the pa$e content *ef nes so/nd content *ef nes bold text Spec f es the base 2RL3tar$et for all relat 1e 2RLs n a doc/ment Not s/pported n HTML%& 2se +SS nstead& Spec f es a defa/lt color5 s 6e5 and font for all text n a doc/ment 7solates a part of text that m $ht be formatted n a d fferent d rect on from other text o/ts de t O1err des the c/rrent text d rect on Not s/pported n HTML%& 2se +SS nstead& *ef nes b $ text *ef nes a sect on that s 8/oted from another so/rce *ef nes the doc/ment9s bod! *ef nes a s n$le l ne brea0 *ef nes a cl c0able b/tton 2sed to dra# $raph cs5 on the fl!5 1 a scr pt n$ :/s/all! ;a1aScr pt< *ef nes a table capt on Not s/pported n HTML%& 2se +SS nstead& *ef nes centered text *ef nes the t tle of a #or0 *ef nes a p ece of comp/ter code Spec f es col/mn propert es for each col/mn # th n a 'col$ro/p) element

'address) 'applet)

'area) 'art cle)New 'as de)New 'a/d o)New 'b) 'base) 'basefont)

'bd )New

'bdo) 'b $)

'bloc08/ote) 'bod!) 'br) 'b/tton) 'can1as)New 'capt on) 'center)

'c te) 'code) 'col)

'col$ro/p) 'command)New 'datal st)New 'dd) 'del) 'deta ls)New 'dfn) 'd alo$)New 'd r)

Spec f es a $ro/p of one or more col/mns n a table for formatt n$ *ef nes a command b/tton that a /ser can n1o0e Spec f es a l st of pre-def ned opt ons for np/t controls *ef nes a descr pt on31al/e of a term n a descr pt on l st *ef nes text that has been deleted from a doc/ment *ef nes add t onal deta ls that the /ser can 1 e# or h de *ef nes a def n t on term *ef nes a d alo$ box or # ndo# Not s/pported n HTML%& 2se '/l) nstead& *ef nes a d rector! l st *ef nes a sect on n a doc/ment *ef nes a descr pt on l st *ef nes a term3name n a descr pt on l st *ef nes emphas 6ed text *ef nes a conta ner for an external :non-HTML< appl cat on =ro/ps related elements n a form *ef nes a capt on for a 'f $/re) element Spec f es self-conta ned content Not s/pported n HTML%& 2se +SS nstead& *ef nes font5 color5 and s 6e for text *ef nes a footer for a doc/ment or sect on *ef nes an HTML form for /ser np/t Not s/pported n HTML%& *ef nes a # ndo# :a frame< n a frameset Not s/pported n HTML%& *ef nes a set of frames *ef nes HTML head n$s *ef nes nformat on abo/t the doc/ment *ef nes a header for a doc/ment or sect on *ef nes a themat c chan$e n the content *ef nes the root of an HTML doc/ment *ef nes a part of text n an alternate 1o ce or mood *ef nes an nl ne frame *ef nes an ma$e *ef nes an np/t control *ef nes a text that has been nserted nto a doc/ment *ef nes 0e!board np/t *ef nes a 0e!-pa r $enerator f eld :for forms< *ef nes a label for an ' np/t) element

'd 1) 'dl) 'dt) 'em) 'embed)New 'f eldset) 'f $capt on)New 'f $/re)New 'font)

'footer)New 'form) 'frame)

'frameset)

'h>) to 'h?) 'head) 'header)New 'hr) 'html) ') ' frame) ' m$) ' np/t) ' ns) '0bd) '0e!$en)New 'label)

ast As an t!po$raph!< *ef nes text that s no lon$er correct *ef nes sample o/tp/t from a comp/ter pro$ram *ef nes a cl ent-s de scr pt *ef nes a sect on n a doc/ment *ef nes a drop-do#n l st *ef nes smaller text *ef nes m/lt ple med a reso/rces for med a elements :'1 deo) and 'a/d o)< *ef nes a sect on n a doc/ment Not s/pported n HTML%& 2se 'del) nstead& *ef nes str 0ethro/$h text *ef nes mportant text *ef nes st!le nformat on for a doc/ment *ef nes s/bscr pted text 'map) 'mar0)New 'men/) 'meta) 'meter)New 'na1)New 'noframes) 'noscr pt) 'ob4ect) 'ol) 'opt$ro/p) 'opt on) 'o/tp/t)New 'p) 'param) 'pre) 'pro$ress)New '8) 'rp)New 'rt)New 'r/b!)New 's) 'samp) 'scr pt) 'sect on)New 'select) 'small) 'so/rce)New 'span) 'str 0e) 'stron$) 'st!le) 's/b) .'le$end) 'l ) 'l n0) *ef nes a capt on for a 'f eldset) element *ef nes a l st tem *ef nes the relat onsh p bet#een a doc/ment and an external reso/rce :most /sed to l n0 to st!le sheets< *ef nes a cl ent-s de ma$e-map *ef nes mar0ed3h $hl $hted text *ef nes a l st3men/ of commands *ef nes metadata abo/t an HTML doc/ment *ef nes a scalar meas/rement # th n a 0no#n ran$e :a $a/$e< *ef nes na1 $at on l n0s Not s/pported n HTML%& *ef nes an alternate content for /sers that do not s/pport frames *ef nes an alternate content for /sers that do not s/pport cl ent-s de scr pts *ef nes an embedded ob4ect *ef nes an ordered l st *ef nes a $ro/p of related opt ons n a drop-do#n l st *ef nes an opt on n a drop-do#n l st *ef nes the res/lt of a calc/lat on *ef nes a para$raph *ef nes a parameter for an ob4ect *ef nes preformatted text Represents the pro$ress of a tas0 *ef nes a short 8/otat on *ef nes #hat to sho# n bro#sers that do not s/pport r/b! annotat ons *ef nes an explanat on3pron/nc at on of characters :for .ast As an t!po$raph!< *ef nes a r/b! annotat on :for .

!<t.0!<.!<rp!<rt!<r)&'!<s!<samp!<script!<section!<select! <small!<so)rce!<span!<stri+e!<strong!<st'le!<s)&!<s)mmar'!<s)p!<ta&le!<t&o('!<t(!<te 2tarea!<t*oot!<t.r!<.)ote!<&o('!<&r!<&)tton!<can-as!<caption!<center!<cite!< co(e!<col!<colgro)p!<comman(!<(atalist!<((!<(el!<(etails!<(*n!<(ialog!<(ir!<(i-!<(l!<( t!<em!<em&e(!<*iel(set!<*igcaption!<*ig)re!<*ont!<*ooter!<*orm!<*rame!<*rameset!<.tml!<i!<i*rame!<img!<inp)t!<ins!<+&(!<+e'gen!<la&el!<legen(!<li!<lin+!<ma p!<mar+!<men)!<meta!<meter!<na-!<no*rames!<noscript!<o&1ect!<ol!<optgro)p!<option! <o)tp)t!<p!<param!<pre!<progress!<.ea(er!<.ea(!<time!<title!<tr!<trac+!<tt!<)!<)l!<-ar!<-i(eo!<w&r! HTML <meta! Ta$ « HTML Reference 'meter) Ta$ » .#a$a!cript"> <meta name="author" content="He%e &e'snes"> .'s/mmar!)New 's/p) 'table) 'tbod!) 'td) 'textarea) 'tfoot) 'th) 'thead) 't me)New 't tle) 'tr) 'trac0)New 'tt) *ef nes a 1 s ble head n$ for a 'deta ls) element *ef nes s/perscr pted text *ef nes a table =ro/ps the bod! content n a table *ef nes a cell n a table *ef nes a m/lt l ne np/t control :text area< =ro/ps the footer content n a table *ef nes a header cell n a table =ro/ps the header content n a table *ef nes a date3t me *ef nes a t tle for the doc/ment *ef nes a ro# n a table *ef nes text trac0s for med a elements :'1 deo) and 'a/d o)< Not s/pported n HTML%& 2se +SS nstead& *ef nes telet!pe text *ef nes text that sho/ld be st!l st call! d fferent from normal text *ef nes an /nordered l st *ef nes a 1ar able *ef nes a 1 deo or mo1 e *ef nes a poss ble l ne-brea0 '/) '/l) '1ar) '1 deo)New '#br)New TAGS: HTML Ta$s <! !<! D"CT#$%!<a!<a&&r!<acron'm!<a((ress!<applet!<area!<article!<asi(e!<a)(io!<&!<&ase!<& ase*ont!<&(i!<&(o!<&ig!<&loc+."ML.ea(! <./! <. !!.xample *escr be metadata # th n an HTML doc/ment" <head> <meta name="description" content="Free Web tutorials"> <meta name="keywords" content="HTML.

<meta charset="(TF)*"> <+head> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'meta) ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e Metadata s data : nformat on< abo/t data& The 'meta) ta$ pro1 des metadata abo/t the HTML doc/ment& Metadata # ll not be d spla!ed on the pa$e5 b/t # ll be mach ne parsable& Meta elements are t!p call! /sed to spec f! pa$e descr pt on5 0e!#ords5 a/thor of the doc/ment5 last mod f ed5 and other metadata& The metadata can be /sed b! bro#sers :ho# to d spla! content or reload pa$e<5 search en$ nes :0e!#ords<5 or other #eb ser1 ces& T ps and Notes Note: 'meta) ta$s al#a!s $oes ns de the 'head) element& Note: Metadata s al#a!s passed as name31al/e pa rs& Note: The content attr b/te M2ST be def ned f the name or the http-e8/ 1 attr b/te s def ned& f none of these are def ned5 the content attr b/te +ANNOT be def ned& .

"HTML."> Attr b/tes New " Ne# n HTML%& Attri&)te 9al)e Description charsetNew content http-e8/ 1 character_set text content-t!pe defa/lt-st!le refresh appl cat on-name a/thor descr pt on $enerator 0e!#ords format/URI Spec f es the character encod n$ for the HTML doc/ment = 1es the 1al/e assoc ated # th the http-e8/ 1 or name attr b/te -ro1 des an HTT. (oc)ment e-er' 58 secon(s: <meta http)e.or o* a page: !!"> <meta name="author" content="He%e &e'snes"> %2ample 6 7e*res. #a$a!cript"> De*ine a (escription o* 'o)r we& page: <meta name="description" content="Free Web tutorials on HTML and %2ample 5 De*ine t.xamples %2ample / De*ine +e'wor(s *or searc. engines: <meta name="keywords" content="HTML. "ML.ui$="re'resh" content="-.e a)t. %2ample 4 !!.header for the nformat on31al/e of the content attr b/te name Spec f es a name for the metadata scheme Not s/pported n HTML%& Spec f es a scheme to be /sed to nterpret the 1al/e of the content attr b/te .* fferences @et#een HTML A&B> and HTML% The scheme attr b/te s not s/pported n HTML%& HTML% has a ne# attr b/te5 charset5 #h ch ma0es t eas er to def ne charset" • • HTML A&B>" 'meta http-e8/ 1CDcontent-t!peD contentCDtext3htmlE charsetC2TF-GD) HTML%" 'meta charsetCD2TF-GD) * fferences @et#een HTML and HHTML 7n HTML the 'meta) ta$ has no end ta$& 7n HHTML the 'meta) ta$ m/st be properl! closed& .

4<+meter> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'meter) ta$ s s/pported n F refox5 Opera5 +hrome5 and Safar ?& *ef n t on and 2sa$e The 'meter) ta$ def nes a scalar meas/rement # th n a 0no#n ran$e5 or a fract onal 1al/e& Th s s also 0no#n as a $a/$e& .<+meter><br> <meter $alue=".=lobal Attr b/tes The 'meta) ta$ also s/pports the =lobal Attr b/tes n HTML& HTML <! ::: ! Ta$ .xamples" * s0 /sa$e5 the rele1ance of a 8/er! res/lt5 etc& Note: The 'meter) ta$ sho/ld not be /sed to nd cate pro$ress :as n a pro$ress bar<& For pro$ress bars5 /se the'pro$ress) ta$& * fferences @et#een HTML A&B> and HTML% The 'meter) ta$ s ne# n HTML%& Attr b/tes New " Ne# n HTML%& Attri&)te 9al)e Description formNew h $hNew lo#New maxNew form_id number number number Spec f es one or more forms the 'meter) element belon$s to Spec f es the ran$e that s cons dered to be a h $h 1al/e Spec f es the ran$e that s cons dered to be a lo# 1al/e Spec f es the max m/m 1al/e of the ran$e ." ma0="1. HTML 7e*erence « HTML Reference HTML <meter! Ta$ 'na1) Ta$ » .">/ out o' 1.23">3.xample 2se the meter element to meas/re data # th n a $ 1en ran$e :a $a/$e<" <meter $alue="/" min=".

xample An HTML comment" <5))This is a comment2 omments are not displayed in the browser))> <p>This is a para%raph2<+p> Tr' it 'o)rsel* 3 @ro#ser S/pport The comment ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e The comment ta$ s /sed to nsert comments n the so/rce code& +omments are not d spla!ed n the bro#sers& .1ent Attr b/tes n HTML& '(*O+T.a1aScr pt from exec/t n$ the --) ta$& * fferences @et#een HTML A&B> and HTML% .) *eclarat on » .-.o/ can /se comments to expla n !o/r code5 #h ch can help !o/ #hen !o/ ed t the so/rce code at a later date& Th s s espec all! /sef/l f !o/ ha1e a lot of code& 7t s also a $ood pract ce to /se the comment ta$ to Dh deD scr pts from bro#sers # tho/t s/pport for t :so the! don9t sho# them as pla n text<" <script type="te0t+6a$ascript"> <5)) 'unction displayMs%78 9 alert7"Hello World5"8 : ++))> <+script> Note: The t#o for#ard slashes at the end of comment l ne :33< s the .m nNew opt m/mNew 1al/eNew number number number Spec f es the m n m/m 1al/e of the ran$e Spec f es #hat 1al/e s the opt mal 1al/e for the $a/$e Re8/ red& Spec f es the c/rrent 1al/e of the $a/$e =lobal Attr b/tes The 'meter) ta$ also s/pports the =lobal Attr b/tes n HTML& .a1aScr pt comment s!mbol& Th s pre1ents .1ent Attr b/tes The 'meter) ta$ also s/pports the .

xplorer I5 F refox5 Opera5 +hrome5 and Safar & Note: 7nternet .& Standard Attr b/tes The comment ta$ does not s/pport an! standard attr b/tes& More nformat on abo/t Standard Attr b/tes& . <a hre'="+css+"> !!<+a> .xplorer G and earl er 1ers ons5 do not s/pport the 'na1) ta$& *ef n t on and 2sa$e The 'na1) ta$ def nes a set of na1 $at on l n0s& Not ce that NOT all l n0s of a doc/ment sho/ld be ns de a 'na1) element& The 'na1) element s ntended onl! for ma4or bloc0 of na-igation lin+s& @ro#sers5 s/ch as screen readers for d sabled /sers5 can /se th s element to determ ne #hether to om t the n t al render n$ of th s content& * fferences @et#een HTML A&B> and HTML% .NON.1ent Attr b/tes The comment ta$ does not s/pport an! e1ent attr b/tes& More nformat on abo/t . <a hre'="+6.1ent Attr b/tes& HTML <na-! Ta$ « HTML Reference 'noframes) Ta$ » .uery+">6<uery<+a> <+na$> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'na1) ta$ s s/pported n 7nternet . <a hre'="+6s+">#a$a!cript<+a> .xample A set of na1 $at on l n0s" <na$> <a hre'="+html+">HTML<+a> .

1ent Attr b/tes n HTML& HTML <noscript! Ta$ « HTML Reference 'ob4ect) Ta$ » .The 'na1) ta$ s ne# n HTML%& =lobal Attr b/tes The 'na1) ta$ also s/pports the =lobal Attr b/tes n HTML& .1ent Attr b/tes The 'na1) ta$ also s/pports the .xample 2se of the 'noscr pt) ta$" <script> document2write7"Hello World5"8 <+script> <noscript>=our browser does not support #a$a!cript5<+noscript> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'noscr pt) ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e The 'noscr pt) ta$ def nes an alternate content for /sers that ha1e d sabled scr pts n the r bro#ser or ha1e a bro#ser that doesn�t s/pport scr pt& The 'noscr pt) element can be /sed n both 'head) and 'bod!)& When /sed ns de the 'head) element" 'noscr pt) m/st conta n 'l n0)5 'st!le)5 and 'meta) elements& The content ns de the 'noscr pt) element # ll be d spla!ed f scr pts are not s/pported5 or are d sabled n the /ser �s bro#ser& T ps and Notes Tip: 7t s also a $ood pract ce to /se the comment ta$ to Dh deD scr pts from bro#sers # tho/t s/pport for cl ent-s de scr pts :so the! don9t sho# them as pla n text<" <script> <5)) 'unction displayMs%78 9 .

alert7"Hello World5"8 : ++))> <+script> * fferences @et#een HTML A&B> and HTML% 7n HTML A&B>5 the 'noscr pt) ta$ can onl! be /sed ns de the 'bod!) element& 7n HTML%5 the 'noscr pt) ta$ can be /sed both ns de 'head) and 'bod!)& * fferences @et#een HTML and HHTML 7n HHTML5 the 'noscr pt) ta$ s not s/pported& =lobal Attr b/tes The 'noscr pt) ta$ also s/pports the =lobal Attr b/tes n HTML& HTML <o&1ect! Ta$ « HTML Reference 'ol) Ta$ » .o/ can also /se the 'ob4ect) ta$ to embed another #ebpa$e nto !o/r HTML doc/ment& ." hei%ht=">.o/ can /se the 'param) ta$ to pass parameters to pl/$ ns that ha1e been embedded # th the 'ob4ect) ta$& T ps and Notes Note: An 'ob4ect) element m/st appear ns de the 'bod!) element& The text bet#een the 'ob4ect) and '3ob4ect) s an alternate text5 for bro#sers that do not s/pport th s ta$& ." data="helloworld2sw'"><+ob6ect> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'ob4ect) ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e The 'ob4ect) ta$ def nes an embedded ob4ect # th n an HTML doc/ment& 2se th s element to embed m/lt med a :l 0e a/d o5 1 deo5 ..a1a applets5 Act 1eH5 -*F5 and Flash< n !o/r #eb pa$es& ..xample Ho# to /se the 'ob4ect) element to embed a Flash f le" <ob6ect width=">.

t!pe of data spec f ed n the data attr b/te Spec f es the name of a cl ent-s de ma$e map to be /sed # th the ob4ect Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es the #h tespace on top and bottom of an ob4ect Spec f es the # dth of the ob4ect border pixels class d class_ID codebase codet!pe URL MIME_type data declare URL declare formNew he $ht hspace form_id pixels pixels name standb! t!pe /semap 1space name text MIME_type #mapname pixels # dth pixels .Tip: For ma$es /se the ' m$) ta$ nstead of the 'ob4ect) ta$& Tip: At least one of the DdataD or Dt!peD attr b/te M2ST be def ned& * fferences @et#een HTML A&B> and HTML% Some HTML A&B> attr b/tes are not s/pported n HTML%& The DformD attr b/te s ne# n HTML%& 7n HTML%5 ob4ects can be /sed and s/bm tted n forms& 7n HTML%5 ob4ects can no lon$er appear ns de the 'head) element of a doc/ment& Attr b/tes New " Ne# n HTML%& Attri&)te 9al)e Description al $n top bottom m ddle left r $ht URL Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es the al $nment of the 'ob4ect) element accord n$ to s/rro/nd n$ elements arch 1e Not s/pported n HTML%& A space separated l st of 2RL9s to arch 1es& The arch 1es conta ns reso/rces rele1ant to the ob4ect Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es the # dth of the border aro/nd an 'ob4ect) Not s/pported n HTML%& *ef nes a class 7* 1al/e as set n the W ndo#s Re$ str! or a 2RL Not s/pported n HTML%& *ef nes #here to f nd the code for the ob4ect Not s/pported n HTML%& The nternet med a t!pe of the code referred to b! the class d attr b/te Spec f es the 2RL of the reso/rce to be /sed b! the ob4ect Not s/pported n HTML%& *ef nes that the ob4ect sho/ld onl! be declared5 not created or nstant ated /nt l needed Spec f es one or more forms the ob4ect belon$s to Spec f es the he $ht of the ob4ect Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es the #h tespace on left and r $ht s de of an ob4ect Spec f es a name for the ob4ect Not s/pported n HTML%& *ef nes a text to d spla! #h le the ob4ect s load n$ Spec f es the M7M.

=lobal Attr b/tes The 'ob4ect) ta$ also s/pports the =lobal Attr b/tes n HTML& .xample J d fferent ordered l sts" <ol> <li> o''ee<+li> <li>Tea<+li> <li>Milk<+li> <+ol> <ol start="?.1ent Attr b/tes n HTML& HTML <ol! Ta$ « HTML Reference 'opt$ro/p) Ta$ » ."> <li> o''ee<+li> <li>Tea<+li> <li>Milk<+li> <+ol> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'ol) ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e The 'ol) ta$ def nes an ordered l st& An ordered l st can be n/mer cal or alphabet cal& 2se the 'l ) ta$ to def ne l st tems& T ps and Notes Tip: For /nordered l st5 /se the '/l) ta$& Tip: 2se +SS to st!le l sts& * fferences @et#een HTML A&B> and HTML% The DstartD and Dt!peD attr b/tes #ere deprecated n HTML A&B>5 b/t 7S s/pported n HTML%& .1ent Attr b/tes The 'ob4ect) ta$ also s/pports the .

xample =ro/p related opt ons # th 'opt$ro/p) ta$s" <select> <opt%roup label="!wedish ars"> <option $alue="$ol$o">@ol$o<+option> <option $alue="saab">!aab<+option> <+opt%roup> <opt%roup label="Aerman ars"> <option $alue="mercedes">Mercedes<+option> <option $alue="audi">Budi<+option> <+opt%roup> <+select> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'opt$ro/p) ta$ s s/pported n all ma4or bro#sers& .e <ol! tag also s)pports t.e %-ent Attri&)tes in HTML <optgro)p! Ta$ 'opt on) Ta$ » « HTML Reference .The Dre1ersedD attr b/te s ne# n HTML%& The DcompactD attr b/te #as deprecated n HTML A&B>5 and s not s/pported n HTML%& Attr b/tes New " Ne# n HTML%& Attri&)te 9al)e Description compact compact Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es that the l st sho/ld render smaller than normal Spec f es that the l st order sho/ld be descend n$ :I5G5K&&&< Spec f es the start 1al/e of an ordered l st Spec f es the 0 nd of mar0er to /se n the l st re1ersedNew start t!pe re1ersed number > A a 7 =lobal Attr b/tes The 'ol) ta$ also s/pports the =lobal Attr b/tes n HTML& .1ent Attr b/tes T.

& Attr b/tes Attri&)te 9al)e Description d sabled label d sabled text Spec f es that an opt on-$ro/p sho/ld be d sabled Spec f es a label for an opt on-$ro/p =lobal Attr b/tes The 'opt$ro/p) ta$ also s/pports the =lobal Attr b/tes n HTML& .xample A drop-do#n l st # th fo/r opt ons" <select> <option <option <option <option <+select> $alue="$ol$o">@ol$o<+option> $alue="saab">!aab<+option> $alue="opel">Cpel<+option> $alue="audi">Budi<+option> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'opt on) ta$ s s/pported n all ma4or bro#sers& .1ent Attr b/tes The 'opt$ro/p) ta$ also s/pports the .*ef n t on and 2sa$e The 'opt$ro/p) s /sed to $ro/p related opt ons n a drop-do#n l st& 7f !o/ ha1e a lon$ l st of opt ons5 $ro/ps of related opt ons are eas er to handle for a /ser& * fferences @et#een HTML A&B> and HTML% NON.1ent Attr b/tes n HTML& HTML& HTML <option! Ta$ « HTML Reference 'o/tp/t) Ta$ » .

E<input type="number" id="b" $alue="?.*ef n t on and 2sa$e The 'opt on) ta$ def nes an opt on n a select l st& 'opt on) elements $o ns de a 'select) or 'datal st) element& T ps and Notes Note: The 'opt on) ta$ can be /sed # tho/t an! attr b/tes5 b/t !o/ /s/all! need the -al)e attr b/te5 #h ch nd cates #hat s sent to the ser1er& Tip: 7f !o/ ha1e a lon$ l st of opt ons5 !o/ can $ro/p related opt ons # th the 'opt$ro/p) ta$& Attr b/tes Attri&)te 9al)e Description d sabled label selected 1al/e d sabled text selected text Spec f es that an opt on sho/ld be d sabled Spec f es a shorter label for an opt on Spec f es that an opt on sho/ld be pre-selected #hen the pa$e loads Spec f es the 1al/e to be sent to a ser1er =lobal Attr b/tes The 'opt on) ta$ also s/pports the =lobal Attr b/tes n HTML& ."> =<output name="0" 'or="a b"><+output> <+'orm> Tr' it 'o)rsel* 3 .xample -erform a calc/lat on and sho# the res/lt n an 'o/tp/t) element" <'orm oninput="02$alue=parseDnt7a2$alue8EparseDnt7b2$alue8">.1ent Attr b/tes The 'opt on) ta$ also s/pports the .">1.. <input type="ran%e" id="a" $alue="?.1ent Attr b/tes n HTML& Related -a$es HTML *OM reference" Opt on ob4ect HTML <o)tp)t! Ta$ « HTML Reference 'p) Ta$ » .

@ro#ser S/pport The 'o/tp/t) ta$ s s/pported n F refox5 Opera5 +hrome5 and Safar & Note: The 'o/tp/t) ta$ s not s/pported n 7nternet .xplorer& *ef n t on and 2sa$e The 'o/tp/t) ta$ represents the res/lt of a calc/lat on :l 0e one performed b! a scr pt<& * fferences @et#een HTML A&B> and HTML% The 'o/tp/t) ta$ s ne# n HTML%& Attr b/tes New " Ne# n HTML%& Attri&)te 9al)e Description forNew element_id Spec f es the relat onsh p bet#een the res/lt of the calc/lat on5 and the elements /sed n the calc/lat on form_id Spec f es one or more forms the o/tp/t element belon$s to Spec f es a name for the o/tp/t element formNew nameNew name =lobal Attr b/tes The 'o/tp/t) ta$ also s/pports the =lobal Attr b/tes n HTML& .1ent Attr b/tes n HTML& HTML <p! Ta$ « HTML Reference 'param) Ta$ » .xample A para$raph s mar0ed /p as follo#s" <p>This is some te0t in a para%raph2<+p> Tr' it 'o)rsel* 3 :more examples at the bottom of th s pa$e< .1ent Attr b/tes The 'o/tp/t) ta$ also s/pports the .

o/rself .@ro#ser S/pport The 'p) ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e The 'p) ta$ def nes a para$raph& @ro#sers a/tomat call! add some space :mar$ n< before and after each 'p) element& The mar$ ns can be mod f ed # th +SS :# th the mar$ n propert es<& * fferences @et#een HTML A&B> and HTML% The al $n attr b/te s deprecated n HTML A&B>5 and s no lon$er s/pported n HTML%& Attr b/tes Attri&)te 9al)e Description al $n left r $ht center 4/st f! Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es the al $nment of the text # th n a para$raph =lobal Attr b/tes The 'p) ta$ also s/pports the =lobal Attr b/tes n HTML& ..xamples of ho# !o/ can NOT #r te a poem n HTML& Related -a$es HTML t/tor al" HTML -ara$raphs .1ent Attr b/tes The 'p) ta$ also s/pports the .1ent Attr b/tes n HTML& Tr! t .xamples More para$raphs Some defa/lt beha1 ors of para$raphs& -oem problems .

xample Set the Da/topla!D parameter to Dtr/eD5 so the so/nd # ll start pla! n$ as soon as the pa$e loads" <ob6ect data="horse2wa$"> <param name="autoplay" $alue="true"> <+ob6ect> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'param) ta$ s s/pported n all ma4or bro#sers& Ho#e1er5 the f le format def ned n 'ob4ect) ma! not be s/pported n all bro#sers& *ef n t on and 2sa$e The 'param) ta$ s /sed to def ne parameters for pl/$ ns embedded # th an 'ob4ect) element& Tip: HTML % also ncl/des t#o ne# elements for pla! n$ a/d o or 1 deo" The 'a/d o) and '1 deo) ta$s& * fferences @et#een HTML A&B> and HTML% The HTML A&B> attr b/tes" Dt!peD and D1al/et!peD5 are not s/pported n HTML%& * fferences @et#een HTML and HHTML 7n HTML the 'param) ta$ has no end ta$& 7n HHTML the 'param) ta$ m/st be properl! closed5 l 0e th s 'param 3)& Attr b/tes Attri&)te 9al)e Description name t!pe 1al/e 1al/et!pe name MIME_type value data ref ob4ect Spec f es the name of a parameter Not s/pported n HTML%& Spec f es the M7M. t!pe of the parameter Spec f es the 1al/e of the parameter Not s/pported n HTML%& Spec f es the t!pe of the 1al/e =lobal Attr b/tes .HTML <param! Ta$ « HTML Reference 'pre) Ta$ » .

1ent Attr b/tes n HTML& HTML <pre! Ta$ « HTML Reference 'pro$ress) Ta$ » .The 'param) ta$ also s/pports the =lobal Attr b/tes n HTML& . and it preser$es both spaces and line breaks <+pre> Tr' it 'o)rsel* 3 @ro#ser S/pport The 'pre) ta$ s s/pported n all ma4or bro#sers& *ef n t on and 2sa$e The 'pre) ta$ def nes preformatted text& Text n a 'pre) element s d spla!ed n a f xed-# dth font :/s/all! +o/r er<5 and t preser1es both spaces and l ne brea0s& T ps and Notes Tip: 2se the 'pre) element #hen d spla! n$ text # th /n/s/al formatt n$5 or some sort of comp/ter code& * fferences @et#een HTML A&B> and HTML% The D# dthD attr b/te s deprecated n HTML A&B>5 and s not s/pported n HTML%& Attr b/tes Attri&)te 9al)e Description # dth number Not s/pported n HTML%& *eprecated n HTML A&B>& Spec f es the max m/m n/mber of characters per l ne .1ent Attr b/tes The 'param) ta$ also s/pports the .xample -reformatted text" <pre> Te0t in a pre element is displayed in a 'i0ed)width 'ont.

1ent Attr b/tes The 'pre) ta$ also s/pports the .=lobal Attr b/tes The 'pre) ta$ also s/pports the =lobal Attr b/tes n HTML& .1ent Attr b/tes n HTML& .