Tuesday, September 22, 2009

3 Semantics, structure, and APIs of HTML documents — HTML 5

In HTML5 certain attributes are allowed on ALL elements, including script tags.

3 Semantics, structure, and APIs of HTML documents — HTML 5: "3.2.3 Global attributes

The following attributes are common to and may be specified on all HTML elements (even those not defined in this specification):

accesskey
class
contenteditable
contextmenu
dir
draggable
id
item
hidden
lang
itemprop
spellcheck
style
subject
tabindex
title"

An element's unique identifier can be used for a variety of purposes, most notably as a way to link to specific parts of a document using fragment identifiers, as a way to target an element when scripting, and as a way to style a specific element from CSS.




No comments: