Content deleted Content added
the URL directly targets the specific element within the document |
|||
Line 10:
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
* The '''class 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.
|