HTML <link> charsetAttribute

HTML link 标签参考手册HTML <link> Tag

Example

The charset attribute indicates that the linked document is written in Japanese:

<link href="domoarigato.htm.html" rel="parent" charset="ISO-2022-JP">


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Note:None of the mainstream browsers support the charset attribute.


Definition and Usage

HTML5 does not support the <link> charset attribute.

The charset attribute specifies the character encoding of the linked document.

The default character set for modern browsers is ISO-8859-1.


Syntax

<link charset="character_set">

Attribute Values

Value Description
character_set The character encoding of the linked document.

Common character sets include:

  • UTF-8 - Unicode character encoding
  • ISO-8859-1 - Character encoding for the Latin alphabet

In theory, any character encoding can be used, but not all browsers can understand them. The more widely a character encoding is used, the more likely a browser is to understand it.

To see all available character encodings, please visit ourCharacter Set Reference Manual。



HTML link 标签参考手册HTML <link> Tag Other Extensions