Learn More

Wednesday, July 20, 2011

Knowing HTML Attribute

Basically, HTML Attribute has a function for additional information for the element. They generally appear as a name-value pairs, separated by "=", and written in the start tag of an element, the element name. See the example below

We encourage you to write html attributes in lowercase. Because the W3C recommends it. And also, the value of the attribute must always be quoted. You can give him with double quotes or with single quotes. For this one is depending on your willingness.

Although it only serves for additional information on the element. However, its presence can affect an element. Therefore, the attribute has its own classification. See this classification

Classification of HTML Attribute:
  • Required and optional. Example for this classified are <applet>, <area>, <body>, etc.
  • Standard. Example for this are <param>, <head>, <iframe>, etc.
  • Event. Example for this are <body>, <b>, <div>, etc.

for more information, you can access it trough HTML Attribute from wikipedia. And if you want to see a complete reference of HTML attribute, then you can access it from index of the html attribute from w3c. But this valid for HTML 4 only.

Post a Comment