X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET 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 »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The sizes attribute is not currently supported in any of the major browsers.


Definition and Usage

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

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


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 FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook