HTML - Attributes

HTML Attributes is an associated property of an HTML element used to extend the capability of an HTML element for example bgcolor is one type of attributes and it is used in body tag,the following some attributes display in table.

Attributes

Use

alt

Alternative text for an image.

style

Inline CSS style for an element.

href

URL for a link

src

URL for a image

id

Unique id for an element

HTML values of the attributes may be wrapped by double quotes,which is not mandatory.HTML attributes nae are sensitive but value is not case sensitive.


alt

The alt attribute are used in Alternative text for an image.the following simple example of it.

Example


<img src="logo.png" alt="Veewom">
							

style

The style attribute is used for Inline CSS style for an element,the following example of it.

Example


<img style="width:100px;height:50px;" src="pl-logo.png" alt="Veewom">
							

href

The href attribute are used for create URL for a link like following example.

Example


<a href="https://veewom.com">
							

src

The src attribute are used to URL show image on html page.

Example


<img src="logo.png" alt="Veewom">
							

id

The id attribute are used to set Unique id for an element.

Example


<div id="nav">
							

Note:

HTML support lostof tag and tag are used lotsof attribute above we describe only few attribute for simple understanding for attribute. View All Attributes

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!