![]() |
An ID attribute is an unique identifier for an element used to create anchors or links to a specific element in the document. It can also be used to define a style with Cascading Style Sheets.
An id has to be unique and must start with a letter A-Z or a-z. After the first letter it is also permitted to use digits (0-9), "-", "_", ";" and ".".
The class attribute is used to define a Cascading Style Sheet style for an element.
<div class=nice_style>
Some text.
</div>
This will make the text inside the DIV element to have the style "nice_style" that is defined in a Cascading Style Sheet.
A class can be defined multiple times.
Defines an inline style definition.
If defined a popup text will appear when you move the mouse over the object. Also works as "Alt" tag in Mozila for image
<a href="mailto:leiken@passagen.se" title="Email to Glubase">leiken@passagen.se</a>
<a href="http://www.htmlplayground.com" title="Great place for learning HTML">HTMLPlayground</a>
<img src="image.jpg" title="A nice image." \>
The lang attribute defines the language of the element's content. It could help search-engines to index a document by its language, and help speech engines to use language dependant pronunciation.
The attribute value should be defined according to this document.
The dir attribute defines the direction of the text inside the element. The following values are possible for this attribute: