HTML <link> sizes Attribute

❮ HTML <link> tag


<link rel="icon" href="demo-icon.png" type="image/png" sizes="16x16">


sizes attribute is used when the rel attribute has a value of icon to define the size of the related icon in a Height×Width format.

The attribute takes a space-separated list if multiple forms are possible or takes the keyword any if size doesn’t matter.

Note: This attribute can only be declared when the rel attribute is present and it has the "icon" value or the registered extension "apple-touch-icon". In any other situation its use is invalid.

Standard Syntax

HTML: <link sizes="HeightxWidth|any">

XHTML: <link sizes="HeightxWidth|any" />

Browser Support


Attribute Values

Value Description Example
HeightxWidth Each size can be composed by a string of two integers separated by the letter "x" or "X". 1 sizes:
<link rel="icon" href="favicon.png" sizes="16x16" type="image/png">
2 sizes:
<link rel="icon" href="favicon.png" sizes="16x16 32x32" type="image/png">
any which represents all posible sizes (this is ideal for SVG icons)
<link rel="icon" href="icon.svg" sizes="any" type="image/svg+xml">
❮ HTML <link> tag