HTML Attribute gives added information to an HTML element.
Attributes always come in name/value pairs such as this: name="value".
Attributes are at all times specified in the start tag of an HTML element.
Example 1:
h1 attribute describes the start of a heading.
h1 align="center" has additional information regarding the position.
Example 2:
body attribute describes the body of an HTML document.
body bgcolor="yellow" has additional information regarding the background color.
Example 3:
table attribute describes an HTML table.
table border="1" has additional information regarding the border around the table.
Apply Lowercase Attributes
Attributes & attribute values are case insensitive. But, the World Wide Web Consortium (W3C) suggests lowercase attributes/attribute values in their HTML 4 suggestion, and XHTML demands lowercase attributes/attribute values.
About Quote Attribute Values
Attribute values should at all times be enclosed in quotes. Double style quotes are the most frequent, but single style quotes are also allowed.
In some uncommon situations, like when the attribute value itself contains quotes, it is essential to use single quotes: such as name='John "ShotGun" Nelson'.
You can also find more web design tips, html tips at www.marthub.co.in
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment