English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Experience Notes

HTML ISO

: <mark> tag

: <progress> tag

 HTML <link> tag

HTML link sizes attribute

The link sizes attribute specifies the size of the visual media icon and is used only when rel = "icon".

Specify the size of the link icon:
Example
<!DOCTYPE html
<html - <head3<title>HTML: <link> sizes attribute/Basic Tutorial Website (w
title>codebox.com)</title>/<link rel="icon" href="haha.gif" type="image16x16">
<body
<h2>Hello world!<</h2>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Currently, almost no mainstream browsers support the sizes attribute.

Definition and Usage

link Sizes attribute specifies the size of the visual media icon.

is used only when rel =" icon".

HTML 4.01 with HTML5difference

The sizes attribute is an HTML5 new attribute added.

Syntax

<link sizes="HeightxWidth|any">

Attribute Value

ValueDescription
HeightxWidthSpecifies one or more sizes for the linked icon.
Height and width are separated by an "x" or "X".

Example s:

  • <link rel="icon" href="favicon.png" sizes="16x16" type="image/png"> (1 sizes)

  • <link rel="icon" href="favicon.png" sizes="16x16 32x32" type="image/png"> (2 sizes)

anySpecifies that the icon is scalable (such as SVG images).

Example:

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

 HTML <link> tag