Content deleted Content added
Magioladitis (talk | contribs) m →References: clean up using AWB |
m Typo fixing per WP:HYPHEN, replaced: globally- → globally using AWB (7660) |
||
Line 11:
Most elements can take any of several common attributes:
* The <code>id</code> attribute provides a document-wide unique identifier for an element. This can be used by stylesheets to provide presentational properties, by browsers to focus attention on the specific element, or by scripts to alter the contents or presentation of an element. Appended to the URL of the page, it provides a globally
* The <code>class</code> attribute provides a way of classifying similar elements. This can be used for [[semantics|semantic]] or presentation purposes. Semantically, for example, classes are used in [[microformat]]s. Presentationally, for example, an HTML document might use the designation <code>class="notation"</code> to indicate that all elements with this class value are subordinate to the main text of the document. Such elements might be gathered together and presented as footnotes on a page instead of appearing in the place where they occur in the HTML source.
* An author may use the <code>style</code> non-attributal codes presentational properties to a particular element. It is considered better practice to use an element’s <code>id</code> or <code>class</code> attributes to select the element with a stylesheet, though sometimes this can be too cumbersome for a simple and specific or ad hoc application of styled properties.
|