6 Attributes
6 Attributes
Previous
Next Chapter
Attributes provide additional information about HTML elements.
HTML Attributes
Attribute Example
HTML links are defined with the <a> tag. The link address is specified in the href attribute:
Example
<a href="http://www.w3schools.com">This is a link</a>
Try it yourself
Description
Specifies one or more classnames for an element (refers to a class in a style sheet)
Specifies a unique id for an element
Specifies an inline CSS style for an element
Specifies extra information about an element (displayed as a tool tip)
For more information about global attributes: HTML Global Attributes Reference.