Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

HTML <link> sizes Attribute

❮ HTML <link> tag


Icon with specified size:

<link rel="icon" href="demo_icon.gif" type="image/gif" sizes="16x16">
Try it Yourself »

Definition and Usage

The sizes attribute specifies the sizes of icons for visual media.

This attribute is only used if rel="icon".

Browser Support

sizes Not supported Not supported Not supported Not supported Not supported


<link sizes="HeightxWidth|any">

Attribute Values

Value Description
HeightxWidth Specifies one or more sizes for the linked icon.
The height and width values are separated by an "x" or "X".


  • <link rel="icon" href="favicon.png" sizes="16x16" type="image/png"> (1 size)
  • <link rel="icon" href="favicon.png" sizes="16x16 32x32" type="image/png"> (2 sizes)
any Specifies that the icon is scalable (like an SVG image)


  • <link rel="icon" href="icon.svg" sizes="any" type="image/svg+xml"> (any size)

❮ HTML <link> tag