Students Empire

Learn Something New
Home

Learn HTML




attributes


Elements can be configured by their attributes.


Attribute Quote


The code above uses double quotes "/index.php" to delimit the attribute value. You can also use single quotes '/index.php'.


Attributes can be added only to start tags or single tags


Attributes can never be added to end tags.


There are a set of global attributes that can be applied to any HTML element


Elements can define their own attributes that provide configuration information specific to the element.


For example, the href attribute is local to the a element. It configures the URL for the hyperlink.


Element with Multiple Attributes


You can apply multiple attributes to an element by separating them with one or more space characters.


The order of the attributes is not important.


In the code above both class and id are global attributes.

You can mix global attributes with the element's specific attributes.


Boolean Attributes


Boolean attributes are attributes without value.


The disable in the following code is a boolean attribute.


The disabled attribute stops the user from entering data.


You can define the same boolean attribute by assigning the empty string ("") or by setting the value to be the name of the attribute.


			  	<input disabled="disabled">
			  

href attributes

HTML links are defined with the <a> tag. The link address is specified in the href attribute:


<a href="http://www.studentsempire.com">click</a>

you will be learn more tag come in later tutorials