HTML <link> sizes attribute
Definition and Usage
sizes
This attribute specifies the size of the linked resource (visual media icon).
Only when the linked resource is an icon (rel="icon"
) is required to use this attribute.
This attribute can accept multiple values. The values are separated by spaces.
Example
Icon with specified size:
<link rel="icon" href="demo_icon.gif" type="image/gif" sizes="16x16">
Syntax
<link sizes="HeightxWidth|any">
Attribute Value
Value | Description |
---|---|
HeightxWidth |
Specifies one or more sizes of the link icon. The height and width values are separated by "x" or "X". Example: Single Size:<link rel="icon" href="favicon.png" sizes="16x16" type="image/png"> Double Size:<link rel="icon" href="favicon.png" sizes="16x16 32x32" type="image/png"> |
any |
Specifies that the icon is scalable (such as SVG images) Example (Any Size): <link rel="icon" href="icon.svg" sizes="any" type="image/svg+xml"> |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |