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

HTML-Referenzhandbuch

HTML-Tag-Verzeichnis

HTML link sizes Attribut

Das link Sizes-Attribut bestimmt die Größe des visuellen Media-Icons und wird nur bei rel = "icon" verwendet.

 HTML <link> Tag

Online-Beispiel

Bestimmen Sie die Größe des Link-Icons:

!DOCTYPE html
<html
<head
<title>HTML:<link> sizes-Attribut - Grundlagen-Tutorial-Website(oldtoolbag.com)</title>
title>codebox.com)</<link rel="icon" href="haha.gif" type="image16x16">
<body
<h2>Hallo Welt! </h2>
</body>
</html>
Testen Sie es heraus ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Currently, almost no mainstream browsers support the sizes attribute.

Definition and Usage

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

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

HTML 40.01 between5difference

The sizes attribute is an HTML5 new attribute added.

Syntax

<link sizes="HeightxWidth|any">

Attribute Value

ValueDescription
HeightxWidthSpecify one or more sizes for the linked icon.
The 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)

anyDefine 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