Skip to content
Related Articles

Related Articles

Improve Article

HTML | DOM Link sizes Property

  • Difficulty Level : Basic
  • Last Updated : 22 Apr, 2019

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.



Return Value: It returns the size of the icon.

Example: This Example returns the sizes Property.

<!DOCTYPE html>
    <link id="linkid"
<body style="text-align:center;">
    <h2>DOM Link sizes Property</h2>
    <button onclick="gfg()">Get URL
    <p id="pid" 
        function gfg() {
            // Access link element. 
            var NEW = document.getElementById(
                "pid").innerHTML = NEW;

Output: :
Before Clicking On Button:

After Clicking On Button:

Supported Browsers:

  • Google Chrome
  • Mozilla Firefox
  • Edge
  • Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :