HTML | DOM Link sizes Property
The HTML | DOM Link sizes Property is used For returning the value of the sizes attribute of a linked document. The sizes attribute is used to specify the sizes of the icon for visual media and it only works when rel=”icon”. It is read-only Property.
Syntax:
linkObject.sizes
Return Value: It returns the size of the icon.
Example: This Example returns the sizes Property.
HTML
<!DOCTYPE html> < html > < head > < link id="linkid" rel="stylesheet" type="text/css" href="styles.css" sizes="16*16"> </ head > < body style="text-align:center;"> < h1 >w3wiki</ h1 > < h2 >DOM Link sizes Property</ h2 > < button onclick="gfg()">Get URL </ button > < p id="pid" style="font-size:25px;color:green;"> </ p > < script > function gfg() { // return Link sizes Property var NEW = document.getElementById( "linkid").sizes; document.getElementById( "pid").innerHTML = NEW; } </ script > </ body > </ html > |
Output:
Before Clicking On Button:
After Clicking On Button:
Supported Browsers:
- Google Chrome
- Mozilla Firefox
- Edge
- Safari
- Opera