Introduction to Html
Component of Html
Following are Examples of attribute:-
1. href attribute:
href Attribute specified link address.
HTML anchor tag
2. src attribute:
src attribute is used with image tag to provide the path for image to be displayed.
It is used as below:
3. alt attribute:
It is used to show alternate text if image is not displayed.The value of alt
attribute should describe the image.It is used as below:
4. width and height attribute:
Width attribute is used to set the width of an image.Height
attribute used to set the height of an image.It is used as below:
5. HTML style attribute:
With style attribute,we can provide style to our HTML element.
The HTML style attribute has the following syntax:
Syntax : <tagname style="property:value;">