Jazzo.co.uk uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our Privacy Policy and our Terms & Condition.

HTML - Attributes

query_builder | Christopher Pisani

Elements have special controllers, which are known as attributes. Multiple attributes are available for almost every element to style, adding identification, adding classes, links, disabling elements and more, and all depends on the element itself. Check every element for available attributes associated with the element.

In the following example, a href attribute is added to element <a>, to attach a link. This will direct the user to the page on the link set in the href.

Attributes are always placed inside the start tag, and consist of a name or a value, separated by a "=" character. Some attributes have a value set by default. An example of these attributes is disabled. The default value is set to true. Follow the next examples to have a better understanding.

Normal button without attributes :
Button with attribute disabled="true" :
Button with attribute disabled ( default value for disabled is true ) :

Note : It is important to note that when using an attribute, after the =, quotation marks should be used outside of the value. Example id="testId". Also, it is a good practice to use lowercase charchters for attribute names as specified by the W3 specification.