HTML <link> sizes Attribute

The sizes attribute on a <link> tag specifies the width and height of a linked icon. This attribute is only used on links with rel="icon".

Example

#

An icon with a width and height specified.

<link rel="icon" href="/img/html.png" type="image/png" sizes="32x32">

Using sizes

The sizes attribute specifies the width and height sizes of an icon/favicon.

This attribute only applies to links with rel="icon".


Syntax

<link rel="icon" sizes="height-x-width | any">

Values

#

Value Description
height-x-width The height and width of the icon separated by the letter "x" (not case sensitive).
any The icon is scalable. Usually used with an svg icon.

Browser support

Here is when sizes support started for each browser:

Chrome
34.0 Apr 2014
Firefox
38.0 May 2015
IE/Edge
16.0 Oct 2017
Opera
25.0 Oct 2014
Safari
9.0 Sept 2015

You may also like

 Back to <link>
Guides