Html attributes
i) Attributes have more information about an element
ii) These are declare inside the start tag only
iii) HTML Attributes are come like value="20"
Some of the Attributes are -
href : (Hypertext REFerence)Assign a URL link to the text or image
ii) These are declare inside the start tag only
iii) HTML Attributes are come like value="20"
Some of the Attributes are -
href : (Hypertext REFerence)Assign a URL link to the text or image
<a href="https://www.google.co.in">Visit Google website</a>
value : Assign a value for the input text element<input type="text" value="default value"></input>
title : Title is used to assign a title for html elements <img src="path/sample.jpg" title="Sample Image">
alt : (Alternate Text) is used to give a alternative text for the link or other html elements <img src="path/sample.jpg" alt="Loading image">
disabled : disable the particular html element <input type="button" disabled></button>
src : (Source) set the source url for the img tag <img src="path/sample.jpg">
id : Specify the unique id of the html element<input type="text" id="txt1"></input>
style : Style is used to apply the css style to the html elements<div style="width:20px;height:20px"></div>
Post a Comment for "Html attributes"