Tải bản đầy đủ (.pdf) (50 trang)

Tài liệu HTML & CSS: The Complete Reference- P6 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (270.27 KB, 50 trang )


226
P a r t I : C o r e M a r k u p

226
P a r t I : C o r e M a r k u p
NOTE MSDN documentation for this element appears incorrect for event handlers. Not all core
events are listed, but during testing they all worked. Other extended events like
onbeforecopy,
oncopy, oncontextmenu, and more were also verified as functional under Internet Explorer 8.
Element-Specific Attributes
cite The value of this attribute is a URL that designates a source document or message that
might explain why the information was deleted.
datetime This attribute is used to indicate the date and time the deletion was made. The value
of the attribute is a date in a special format as defined by ISO 8601. The basic date format is
YYYY-MM-DDThh:mm:ssTZD
where the following is true:
YYYY=four-digit year such as 1999
MM=two-digit month (01=January, 02=February, and so on.)
DD=two-digit day of the month (01 through 31)
hh=two-digit hour (00 to 23) (24-hour clock, not AM or PM)
mm=two-digit minute (00 through 59)
ss=two-digit second (00 through 59)
TZD=time zone designator
The time zone designator is either Z, which indicates Universal Time Coordinate or
coordinated universal time format (UTC), or +hh:mm, which indicates that the time is a local
time that is
hh hours and mm minutes ahead of UTC. Alternatively, the format for the time
zone designator could be –hh:mm, which indicates that the local time is behind UTC. Note
that the letter
T actually appears in the string, all digits must be used, and 00 values for


minutes and seconds might be required. An example value for the datetime attribute
might be 1999-10-6T09:15:00-05:00, which corresponds to October 6, 1999, 9:15 A.M.,
U.S. Eastern Standard Time.
Example
<p><del cite="
datetime="2008-10-06T09:15:00-05:00">
The penalty clause applies to client lateness as well.
</del> <ins>No more penalties</ins></p>
Compatibility
HTML 4, 4.01, 5
XHTML 1.0, 1.1
Firefox 1+, Internet Explorer 4+,
Netscape 6+, Opera 7+, Safari 1+
Notes
• Browsers can render deleted (<del>) text in a different style to show the changes
that have been made to the document. Internet Explorer renders the deleted text as
strikethrough text. Eventually, a browser could have a way to show a revision
history on a document.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
227
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
227
PART I
• User agents that do not understand <del> or <ins> will show the information
anyway, so there is no harm in adding information—only in deleting it. Because of
the fact that
<del>-enclosed text might show up, it might be wise to comment it out
within the element, as shown here:
<del>

<! This is old information. >
</del>
<details> (Additional Details)
This HTML5 element represents additional information or interactive elements that can be
shown on demand.
HTML5 Standard Syntax
<details
accesskey="spaced list of accelerator key(s)"
class="class name(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
dir="ltr | rtl"
draggable="true | false | auto"
hidden="hidden"
id="unique alphanumeric identifier"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
lang="language code"
open="true | false"
spellcheck="true | false"
style="style information"
tabindex="number"
title="advisory text">

dt or dd elements and other content or controls


</details>
Element-Specific Attribute
open This Boolean attribute indicates whether details should be shown to the user. If not
they are not shown, and would likely be exposed via a script event.
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

228
P a r t I : C o r e M a r k u p

228
P a r t I : C o r e M a r k u p
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Example
<details onclick="this.open='open';">
<dt>Help?</dt>
<dd>
<p>This could give you help with HTML5 but we need more implementations to
prove how things will work.</p>
</dd>
</details>
Compatibility

HTML5 Not currently supported by any browser, but addressed with a custom element.
Notes
• This element may contain one dt element describing the caption of the detailed
content, and one dd element, which contains the content to show.
• In early drafts of HTML5 specification, the
legend element was used instead of the
dt and dd elements added later.
<dfn> (Definition)
This inline logical element encloses the defining instance of a term. It usually is rendered as
bold or bold italic text.
Standard Syntax
<dfn
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

</dfn>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
229
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
229
PART I
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,

onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmousewheel, onmove, onmoveend, onmovestart,
onpaste, onpropertychange, onreadystatechange, onresize, onresizeend,
onresizestart, onselectstart
Example
<p>The <dfn>dfn</dfn> element is an element which is used to set off the
defining instance of a term. Now that's a self-contained example!</p>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 6+, Opera 4+, Safari 1+
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

230
P a r t I : C o r e M a r k u p

230
P a r t I : C o r e M a r k u p
Notes
• HTML 2 and 3.2 defined no attributes for this element.
• HTML5 suggests that the section or content grouping nearest an occurrence of a
dfn

element must contain the actual definition.
<dir> (Directory List)
This element encloses a list of brief, unordered items, such as might occur in a menu or
directory. It is deprecated or obsolete under most specifications.
Standard Syntax (Transitional Only—Deprecated)
<dir
class="class name(s)"
compact="compact"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

li elements only

</dir>
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,

onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize,
onresizeend, onresizestart, onselectstart, ontimeerror
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
231
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
231
PART I
Element-Specific Attribute
compact This attribute reduces the white space between list items.
Example
<dir>
<li>Header Files</li>
<li>Code Files</li>
<li>Comment Files</li>
</dir>
Compatibility
HTML 2, 3.2, 4, 4.01 (transitional)
XHTML 1.0 (transitional)
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 2.1+, Safari 1+
Notes
• Because the <dir> tag is supposed to be used with short lists, the items in the list
should have a maximum width of 20 characters. This is rarely if ever respected.

• The HTML and XHTML strict specifications do not support this element, and the
HTML5 specification has marked it as obsolete and suggests using a
<ul> tag
instead.
• Most browsers will not render a
<dir> tag any differently from the <ul> tag.
• HTML 2 and 3.2 define only the
compact attribute.
• Most browsers will not render the
compact list style.
• For XHTML transitional compatibility, the
compact attribute must have a value:
<dir compact="compact">.
<div> (Division)
This element indicates a generic block of content that should be treated as a logical unit for
scripting or styling purposes.
Standard Syntax
<div
align="center | justify | left | right" (transitional only)
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

</div>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"

contextmenu="id of menu"
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

232
P a r t I : C o r e M a r k u p

232
P a r t I : C o r e M a r k u p
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
datafld="name of column supplying bound data" (4)
dataformatas="html | text" (4)
data disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
nowrap="no | yes" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes

onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize,
onresizeend, onresizestart, onselectstart, ontimeerror
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
233
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
233
PART I
Element-Specific Attribute
nowrap This Internet Explorer–specific attribute is used to control the wrapping of text

within a <div> tag. If set to yes, text should not wrap. The default is no. CSS rules should
be used instead of this attribute.
Examples
<div align="justify">
<! IE syntax >
All text within this division will be justified
</div>
<div class="special" id="div1" style="background-color: yellow;">
Divs are useful for setting arbitrary style
</div>
<div class="container">
<div class="wrapper">
<div class="content"><p>I have divitis</p></div>
</div>
</div>
Compatibility
HTML 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 2+, Opera 4+, Safari 1+
Notes
• A <div> tag is a generic block tag and is very useful for binding scripts or styles to
an arbitrary section of a document. It complements <span>, which is used inline.
• Excessive use of
<div> tags is almost as bad as excessive use of tables, particularly
when structuring page content.
• The HTML 4 specification specifies that the
datafld, dataformatas, and datasrc
attributes are reserved for <div> and might be supported in the future. They were
removed from XHTML, but Internet Explorer supports them for data binding.

• Under the HTML 4.01 strict specification, the
align attribute is not supported.
• HTML 3.2 supports only the
align attribute.
<dl> (Definition List)
This element encloses a list of terms and definitions. A common use for this element is to
implement a glossary.
Standard Syntax
<dl
class="class name(s)"
compact="compact" (transitional only)
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

234
P a r t I : C o r e M a r k u p

234
P a r t I : C o r e M a r k u p
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

dt and dd elements only

</dl>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"

contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,

onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
235
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
235
PART I
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize,
onresizeend, onresizestart, onselectstart, ontimeerror
Element-Specific Attribute
compact This attribute reduces the white space between list items.
Examples
<dl>
<dt>Cat</dt>
<dd>A domestic animal that likes fish.</dd>
<dt>Skunk</dt>
<dd>A wild animal that needs deodorant.</dd>
</dl>
<! Terms definitions don't have to pair match >
<dl>
<dt>Cat</dt>

<dt>Fritz</dt>
<dt>Sylvester</dt>
<dd>A domestic animal that likes fish.</dd>
<dt>Skunk</dt>
<dt>Pepe Le Pew</dt>
<dd>A wild animal that needs deodorant.</dd>
<dt>Tasmanian Devil</dt>
</dl>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 2.1+, Safari 1+
Notes
• The items in the list comprise two parts: the term, indicated by the dt element, and
its definition, indicated by the dd element. However, there is no requirement to
match these elements, alternate them, or anything else, at least syntax-wise.
• Some page designers might use a
<dl> tag or <ul> tag to create text indention.
Although this is a common practice on the Web, it is not advisable because it
confuses the meaning of the element by making it a physical layout device rather
than a list. A CSS property like margin or position should be used instead.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

236
P a r t I : C o r e M a r k u p

236
P a r t I : C o r e M a r k u p
• HTML 2 and 3.2 support only the compact attribute for this element.

• For XHTML compatibility, the
compact attribute must be expanded:
<dl compact="compact"> under the transitional form. It is deprecated under the
strict specification. In practice, regardless of whether it is indicated, the
compact
attribute generally has no effect.
<dt> (Term in a Definition List or Caption in Figure or Details)
This element identifies a definition list term in a list of terms and definitions. Under
HTML5, the element is also used within <details> and <figure> tags to represent a
caption for content.
Standard Syntax
<dt
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

</dt>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"

itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
nowrap="true | false" (5.5)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
237
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
237
PART I
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,

onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize,
onresizeend, onresizestart, onselectstart, ontimeerror
Element-Specific Attribute
nowrap This Internet Explorer–specific attribute is used to control the wrapping of text
within a <dt> tag. If set to yes, text should not wrap. The default is no. CSS properties
should be used instead of this attribute.
Examples
<! Typical definition list usage >
<dl>
<dt>Vole</dt>
<dd>Small creature related to the weasel</dd>
<dt>Weasel</dt>
<dd>Small creature related to the vole</dd>
</dl>
<! HTML5 examples >

<details>
<dt>Important Notes</dt>
<dd>This tag seems to be reused too much under HTML5!<dd>
</details>

<figure>
<dt>Moose Baby!</dt>
<dd>
<img src="desmond.jpg" alt="Desmond Baby" height="320" width="150">
<p>A photo of Desmond circa 2010.</p>
</dd>
</figure>
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

238
P a r t I : C o r e M a r k u p

238
P a r t I : C o r e M a r k u p
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 2.1+, Safari 1+
Notes
• Traditionally, this element occurs within a list of defined terms enclosed by a <dl>
tag. It is generally used in conjunction with a <dd> tag, which indicates its
definition. However, <dt> tags do not require a one-to-one correspondence with
<dd> tags.
• HTML5 overloads the meaning of this element so that it also serves as the caption of
content enclosed within
<details> and <figure> tags.
• Under early drafts of HTML5,this element is also found within
<dialog> tags and
defines the speakers of particular statements. When used within such tags, it must

be paired with <dd> tags in a one-to-one fashion. That syntax was eventually
dropped.
• The close tag for the element is optional under older versions of HTML as well as
HTML5, but including it is suggested, especially when it will make things clearer,
particularly with multiple-line definitions.

Under XHTML 1.0, the closing
</dt> tag is mandatory.
• HTML 2 and 3.2 support no attributes for this element.
<em> (Emphasis)
This inline element indicates emphasized text, which many browsers will display as italic text.
Standard Syntax
<em
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

</em>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
239
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
239
PART I
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,

onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize,
onresizeend, onresizestart, onselectstart, ontimeerror
Example
<p><em>This is the important point</em> to consider, not this other less
exciting point.</p>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 2.1+, Safari 1+
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

240
P a r t I : C o r e M a r k u p

240
P a r t I : C o r e M a r k u p
Notes
• As a logical element, em is a prime candidate to bind style information to. For
example, to define emphasis to mean a larger font size in the Impact font instead of

italics, you might use a CSS rule like the following in a document-wide style sheet:
em {font-size: larger; font-family: Impact; font-style: normal;}
• HTML 2 and 3.2 support no attributes for this element.
<embed> (Embedded Object)
This widely supported nonstandard element specifies an object, typically a multimedia
element, to be embedded in an HTML document. The syntax can be somewhat variable
given the plug-in–specific attributes found, so the reference covers those commonly found.
Proprietary Syntax (Commonly Supported)
<embed
accesskey="key"
align="absbottom | absmiddle | baseline | bottom |
left | middle | right | texttop | top" (4)
alt="alternative text"
border="pixels"
class="class name(s)"
code="filename"
codebase="URL"
height="pixels"
hspace="pixels"
id="unique alphanumeric identifier" (4)
language="javascript | jscript | vbs | vbscript | xml" (5.5)
name="string"
palette="background | foreground" (4)
pluginspage="URL"
style="style information"
title="advisory text"
type="mime type"
units="em | pixels"
unselectable="on | off"
vspace="pixels"

width="pixels">

</embed>
Attributes Introduced by HTML5
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
241
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
241
PART I
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,

onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecut, onbeforedeactivate, onbeforepaste,
onblur, oncontextmenu, oncontrolselect, oncut, ondeactivate, onfocus,
onfocusin, onfocusout, onhelp, onload, onlosecapture, onmouseenter,
onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste,
onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart,
onscroll
Element-Specific Attributes
align This attribute controls the alignment of adjacent text with respect to the embedded
object. The default value is left.
alt This attribute indicates the text to be displayed if the embedded object cannot be
executed.
border This attribute specifies the size, in pixels, of the border around the embedded
object.
code This attribute specifies the name of the file containing the compiled Java class if the
embed element is used to include a Java applet. This is a strange alternative form of Java
inclusion documented by Microsoft.
codebase This specifies the base URL for the plug-in or potential applet in the case of the
alternative form under Internet Explorer.
name This attribute specifies a name for the embedded object, so that it can be referenced
by client-side programs in an embedded scripting language.
palette This attribute is used only on Windows systems to select the color palette used for
the plug-in and might be set to background or foreground. The default is background.
pluginspage This attribute contains the URL of instructions for installing the plug-in
required to render the embedded object.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

242

P a r t I : C o r e M a r k u p

242
P a r t I : C o r e M a r k u p
src This attribute specifies the URL of source content for the embedded object.
type This attribute specifies the MIME type of the embedded object. It is used by the
browser to determine an appropriate plug-in for rendering the object. It can be used instead
of the src attribute for plug-ins that have no content or that fetch it dynamically.
units This Netscape 4+–specific attribute is used to set the units for measurement for the
embedded object in pixels or as a relative em value.
vspace This attribute specifies, in pixels, the size of the top and bottom margins between
the embedded object and surrounding text.
Example
<! embed with a close tag >
<embed src="testmovie.mov" height="150" width="150">
<noembed>
<img src="testgif.gif" height="150" width="150" alt="Test Image">
</noembed>
</embed>
Compatibility
No standard initially, but widely supported
HTML5
Firefox 1+, Internet Explorer 4+,
Netscape 2+, Opera 4+, Safari 1+
Notes
• Historically, it has been unclear whether or not the close tag for <embed> is required.
Many sites tended not to use it, and documentation is not consistent. A close </embed>
tag should be required and should surround any alternative content in a noembed
element.
• This element was supposed to be phased out in favor of the

object element, but so
far its usage seems to have diminished only slightly.
• The
embed element is not favored by the W3C and was dropped by (X)HTML
specifications previous to HTML5.
• Embedded objects are multimedia content files of arbitrary type that are rendered by
browser plug-ins. The
type attribute uses a file’s MIME type to determine an
appropriate browser plug-in. Any attributes not defined are treated as object-specific
parameters and are passed through to the embedded object. Consult the plug-in or
object documentation to determine these.
<fieldset> (Form Field Grouping)
This element allows form designers to group thematically related controls together. The
element usually contains a legend element, which labels the grouped form controls.
Standard Syntax
<fieldset
class="class name(s)"
dir="ltr | rtl"
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
243
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
243
PART I
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">

</fieldset>

Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
disabled="disabled"
draggable="true | false | auto"
form="id of related form"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
accesskey="char" (5.5)
align="center | left | right" (4)
contenteditable="false | true | inherit" (5.5)
datafld="name of column supplying bound data" (4)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup
HTML5 Event Attributes

onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

244
P a r t I : C o r e M a r k u p

244
P a r t I : C o r e M a r k u p
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onresize,
onresizeend, onresizestart, onselectstart, ontimeerror
Example
<fieldset>
<legend>Customer Identification</legend>
<br>

<label>Customer Name:
<input type="text" id="CustName" size="25">
</label>
</fieldset>
Compatibility
HTML 4, 4.01, 5
XHTML 1.0, 1.1
Firefox 1+, Internet Explorer 4+,
Netscape 6+, Opera 4+, Safari 1+
Notes
• Grouping controls makes it easier for users to understand the purposes of the
controls while simultaneously facilitating tabbing navigation for visual user agents
and speech navigation for speech-oriented user agents. The proper use of this
element makes documents more accessible to users with disabilities.
• The full set of data-binding attributes likely needs to be bound to this element but is
missing from MSDN documentation.
• The caption for a
<fieldset> tag can be defined by the legend element. There
should only be a single legend element within the element.
<figure> (Figure)
This HTML5 element represents a group of content enclosed in a dd element, often with a
caption defined by a dt element, that can be moved away from the main flow of the
document. The way in which this element is implemented is similar to how the figures in
this book are presented—not necessarily directly adjacent to the text discussing them.
HTML5 Standard Syntax
<figure
accesskey="spaced list of accelerator key(s)"
class="class name(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"

data-X="user-defined data"
dir="ltr | rtl"
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
245
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
245
PART I
draggable="true | false | auto"
hidden="hidden"
id="unique alphanumeric identifier"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
lang="language code"
spellcheck="true | false"
style="style information"
tabindex="number"
title="advisory text">

</figure>
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,

onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Figure It Out</title>
</head>
<body>
<header><h1>Welcome to the Example</h1></header>
<p>Yes it is another boring example. In this case we would like you
to review <a href="#fig1">Figure Ex-1</a></p>
<p>More and more text is found until eventually the figure is
located.</p>
<figure>
<dd>
<img src="screensnap.png"
alt="A screen capture of the Figure Element in action">
<p>The mighty fig tag has returned from HTML 3 as figure to haunt
your dreams.</p>
</dd>
<dt>Figure Ex-1</dt>
</figure>

<p>Maybe some more content here.</p>
</body>
</html>
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.


246
P a r t I : C o r e M a r k u p

246
P a r t I : C o r e M a r k u p
Compatibility
HTML5 Not currently supported by any browser, but addressed with a custom element.
Notes
• While this element is not yet supported, it is easily simulated by using a custom tag
or using a <div> tag with a special class.
• Early drafts of HTML5 suggested using a
<legend> tag for captioning; later, the
<dt> and <dd> tags were introduced for containing figure caption and figure
content, respectively.
<font> (Font Definition)
This element allows specification of the size, color, and font of the text it encloses.
Standard Syntax (Transitional Only)
<font
class="class name(s)"
color="color name | #RRGGBB"
dir="ltr | rtl"
face="font name"
id="unique alphanumeric identifier"
lang="language code"
size="1 to 7 | +1 to +6 | -1 to -6"
style="style information"
title="advisory text">

</font>

Attributes Defined by Internet Explorer
accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off"(5.5)
Attributes Defined by Netscape
point-size="point size for font" (4)
weight="100 | 200 | 300 | 400 | 500
600 | 700 | 800 | 900" (4)
Events Defined by Internet Explorer
onactivate, onbeforedeactivate, onbeforeeditfocus, onblur, onclick,
oncontrolselect, ondblclick, ondeactivate, ondrag, ondragend, ondragenter,
ondragleave, ondragover, ondragstart, ondrop, onfocus, onkeydown,
onkeypress, onkeyup, onhelp, onmousedown, onmouseenter, onmouseleave,
onmousemove, onmouseout, onmouseover, onmouseup, onmove, onmoveend,
onmovestart, onreadystatechange, onresizeend, onresizestart, onselectstart,
ontimeerror
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
247
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
247
PART I
Element-Specific Attributes
color This attribute sets the text color using either a browser-dependent named color or a
color specified in the hexadecimal #RRGGBB format.
face This attribute contains a list of one or more font names separated by commas. The

user agent looks through the specified font names and renders the text in the first font that
is supported.
point-size This Netscape 4–specific attribute specifies the point size of text and is used with
downloadable fonts. It is listed for historical purposes only and is easily mimicked using the
font-size CSS property.
size This attribute specifies the font size as either a numeric or relative value. Numeric
values range from 1 to 7, with 1 being the smallest and 3 the default. The relative values, +
and -, increment or decrement the font size relative to the current size. The value for
increment or decrement should range only from +1 to +6 or -1 to -6.
weight Under Netscape 4, this attribute specifies the weight of the font, with a value of 100
being lightest and 900 being heaviest. This is listed primarily for historical purposes; such
visual changes are best implemented using the font-weight CSS property.
Example
<p><font color="#FF0000" face="Helvetica, Times Roman" size="+1">
Relatively large red text in Helvetica or Times.
</font></p>
Compatibility
HTML 3.2, 4, 4.01 (transitional)
XHTML 1.0 (transitional)
Firefox 1+, Internet Explorer 2+,
Netscape 1.1+, Opera 4+, Safari 1+
Notes
• Use of this element is not encouraged, as it is not part of strict HTML and XHTML
specifications. HTML5 defines this element as obsolete. CSS properties like
font-face, color, and font-size provide a richer way of providing the same
functionality as this element.
• Interestingly, the transitional specification for some reason does not define core
events for this element. In practice, they are supported by major browsers.
• The default text size for a document can be set using the
size attribute of the

basefont element.
• The HTML 3.2 specification supports only the
color and size attributes for this
element.
• HTML5 appears to define all the common attributes for this element, but does not
define those which are important to perform its stated task.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

248
P a r t I : C o r e M a r k u p

248
P a r t I : C o r e M a r k u p
<footer> (Footer)
This HTML5 element represents the footer section of a document or a section element it is
contained within. Like a typical document footer in print, it should contain supplementary
information about the related content.
HTML5 Standard Syntax
<footer
accesskey="spaced list of accelerator key(s)"
class="class name(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
dir="ltr | rtl"
draggable="true | false | auto"
hidden="hidden"
id="unique alphanumeric identifier"
itemid="microdata id in URL format"
itemprop="microdata value"

itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
lang="language code"
spellcheck="true | false"
style="style information"
tabindex="number"
title="advisory text">

</footer>
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Document Footer</title>
</head>
<body>
<header><h1>Welcome to the Example</h1></header>
<p>Yes it is another boring example.</p>

<footer><p>&copy; 2010 Boring Examples, Inc.</p></footer>
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
249
C h a p t e r 3 : H T M L a n d X H T M L E l e m e n t R e f e r e n c e
249
PART I
</body>
</html>
<! Simple section footer >
<section>
<header>
<h1>Section Heading</h1>
</header>
<p>Section Body</p>
<p>More Body</p>
<footer>
<p>Boring Example &copy; 2010</p>
</footer>
</section>
Compatibility
HTML5 Not currently supported by any browser, but addressed with a custom element.
Notes
• While this element is not yet supported, it is easily simulated by using a custom tag
or using a <div> tag with a special class.
• A
footer element should be included in the HTML5 outlining process.
<form> (Form for User Input)
The element defines a fill-in form that can contain labels and form controls, such as menus
and text entry boxes that might be filled in by a user.

Standard Syntax
<form
accept-charset="list of supported character sets"
action="URL"
class="class name(s)"
dir="ltr | rtl"
enctype="application/x-www-form-urlencoded |
multipart/form-data | text/plain |
Media Type as per RFC 2045"
id="unique alphanumeric identifier"
lang="language code"
method="get | post"
name="form's name for scripting"
style="style information"
target="_blank | frame name | _parent | _self |
_top" (transitional only)
title="advisory text">

</form>
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

250
P a r t I : C o r e M a r k u p

250
P a r t I : C o r e M a r k u p
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
autocomplete="on | off"
contenteditable="true | false | inherit"

contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
novalidate="novalidate"
spellcheck="true | false"
tabindex="number"
Attributes Defined by Internet Explorer
autocomplete="yes | no" (5.0)
contenteditable="false | true | inherit" (5.5)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)
HTML 4 Event Attributes
onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onreset, onsubmit
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,

onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend,
onmovestart, onpaste, onpropertychange, onreadystatechange, onreset
onresizeend, onresizestart, onselectstart, onsubmit, ontimeerror
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

×