English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Attributes are additional information provided by HTML elements, such as width, height, style, etc.
HTML elements can set attributes
Attributes can add additional information to the element
Attributes are generally described in the start tag
Attributes are always named/appear in the form of value pairs, such as: target="_blank".
HTML hyperlinks are defined by the <a> tag, and the address of the hyperlink is specified in the href attribute:
<a href="https://www.oldtoolbag.com">This is a hyperlink</a>Test to see ‹/›
Attribute values should always be enclosed in quotes.
Double quotes are the most commonly used, but it is also fine to use single quotes.
Tip: In some individual cases, such as attribute values themselves containing double quotes, then you must use single quotes, for example: name='John "ShotGun" Nelson&39;
Attributes and attribute values are case-insensitive.
However, the World Wide Web Consortium in its HTML 4 Recommended in the standard recommendations for lowercase attributes/Attribute values.
While the new version of (X)HTML requires the use of lowercase attributes.
Suggestion: Use lowercase tags consistently
View the complete list of HTML attributes:HTML Tag Reference Manual.
The following lists the attributes applicable to most HTML elements:
Attribute | Description |
class | Define one or more class names (class names from style sheets) |
id | Define the unique id of the element |
style | Define the inline style of the element |
title | Additional information about the element (used as a toolbar) |
More standard attribute descriptions:HTML Standard Attribute Reference Manual.