X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <link> sizes Attribute

HTML link Tag Reference HTML <link> tag

Example

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

Attribute
sizes Not supported Not supported Not supported Not supported Not supported


Differences Between HTML 4.01 and HTML5

The sizes attribute is new in HTML5.


Syntax

<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".

Examples:

  • <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)

Examples:

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


HTML link Tag Reference HTML <link> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook