In HTML5 certain attributes are allowed on ALL elements, including script tags.
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:
Post a Comment