First time visitor? The tutorials start here.

xHTML and CSS Glossary – Attribute

“Attribute” applies to xHTML. Attributes come in two parts, the name and the value.

In xHTML, an attribute name/value pair would look something like this:

href="http://google.com"

href is the attribute name, while the link to Google is the attribute value. When used inside an anchor link (<a>), it would look something like this:

<a href="http://google.com">Google</a>

xHTML attribute names are followed by an equal sign (=), and the attribute value must be surrounded by a pair of either single or double quotes.

href='http://google.com' (with the single quotes) would work as well.


If you found this article useful, please spread the word:
Stumble it! Digg! Tweet it!



Questions or comments?

Please log in to post a comment. Sorry, but it prevents this from happening. If you're not registered yet, you can register here.