attributeS teLL uS more about eLementS - HACK.ME
Trending
Monday, March 2, 2015

attributeS teLL uS more about eLementS

Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts: a name and a value, separated by an equals sign.


The attribute name indicates what kind of extra information you are supplying about the element's content. It should be written in lowercase.
The value is the information or setting for the attribute. It should be placed in double quotes. Different attributes can have different values.
Here an attribute called lang is used to indicate the language used in this element. The value of this attribute on this page specifies it is in US English.
HTML5 allows you to use uppercase attribute names and omit the quotemarks, but this is not recommended


The majority of attributes can only be used on certain elements, although a few attributes (such as lang) can appear on any element.
 Most attribute values are either pre-defined or follow a stipulated format. We will look at the permitted values as we introduce each new attribute. 
The value of the lang attribute is an abbreviated way of specifying which language is used inside the element that all browsers understand.







attributeS teLL uS more about eLementS Reviewed by Vipula Dissanayake on 2:23:00 AM Rating: 5 Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of...

No comments: