HTML Attributes
Tags tell the browser what to do and attributes tell the browser how to do.- HTML elements can have attributes
- Attributes provide additional information about an element
- Attributes are always specified in the start tag
- Attributes come in name/value pairs like: name="value"
In the below example HTML links are defined with the <a> tag. The link address is specified in the href attribute:
html attribute example |
---|
<a href="http://www.w3schools.com">This is a link</a> |
Note:Attribute values should always be enclosed in quotes.
Double style quotes are the most common, but single style quotes are also allowed.
Example:name='romieo' or name="romieo".
Note:the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation. So use lowercase attributes.
HTML Attributes
For list of attributes click here






0 comments:
Post a Comment
Please leave some comment.