HTML Tags Attributes

Attributes in HTML Tags

In HTML Tags we can also specify the attributes in Start Tag of the Element. Attribute are the Additional information about that tag which define the characteristics of an element for example Height, Reference, Color etc . The Attribute have two part one is attribute name and other is its value. Below we briefly discuses the different attribute in HTML.

The general syntax is as follows:

<tag attribute 1 = "value" attribute 2 = "value" ... >

For example :
<body bgcolor="#E6E6FA">

Core Attributes

Core attribute pass the some extra information for example title or identifier formatting information. Following are the some of the core attribute:

Title Attribute

This attribute define the title of any element.

For example use title attribute with H1 element.

<h1 title="This is Heading One"> Hello HTML</h1>

Now this will produced the result

Hello HTML

If you move the mouse over The text "Hello HTML" then you will see the Your specified title appear as tool tips.

id Attribute

This attribute used to identify the element in html to impose some operation on it. for example you have two Table then impose the different formatting option through the Style Sheet so you can use id which unequally identify the each element .

EXAMPLE
<h1 id="mainheading">About HTML Attribute</h1>

Style Attribute

Style attribute allows you to specify Cascading Style Sheet (CSS) rules within the element. For example

 <p style="font-family:calibri; color:#FF0000;">Learninghints.com </p>

Internationalization Attributes

These types of attribute provide internationalization and localization support. For example Lang and dir attribute.

lang Attribute

This attribute tell to the browser about the main language used in a document. This attribute has been replaced by the xml:lang attribute in new version.

For Example <html lang="en">

Generic Attributes

Following are the some generic attribute which are used with most element of HTML.