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.
The alt attribute are used in Alternative text for an image.the following simple example of it.
<img src="logo.png" alt="Veewom">
The style attribute is used for Inline CSS style for an element,the following example of it.
<img style="width:100px;height:50px;" src="pl-logo.png" alt="Veewom">
The href attribute are used for create URL for a link like following example.
<a href="https://veewom.com">
The src attribute are used to URL show image on html page.
<img src="logo.png" alt="Veewom">
The id attribute are used to set Unique id for an element.
<div id="nav">
HTML support lostof tag and tag are used lotsof attribute above we describe only few attribute for simple understanding for attribute. View All Attributes