HTML <a> charsetAttribute

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

Examples

The following example uses the charset attribute in a link:

<a charset="UTF-8" href="../index.html">Visit Example!</a>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

No major browsers support the charset attribute.


Definition and Usage

HTML5 no longer supports the charset attribute of the <a> tag.

The charset attribute of the <a> tag specifies the character encoding used in the document linked to.


Syntax

<a charset="value">

Attribute Values

Value Description
character_set

The character set 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 set can be used, but not all browsers can understand them. The more widely a character set is used, the more likely a browser will understand it.

To view all available character sets, please visit ourCharacter Set Reference。



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

Other Extensions