charset (HTML attribute)
| Depr. | Version |
|---|---|
| No | HTML 4 |
| IE8 | FF2 | SA4 | OP10 | CH2 |
|---|---|---|---|---|
| None | None | None | None | None |
Syntax
Description
The
charset attribute is used to identify the character
set used in the document that’s being linked to (that is, referenced in
the href attribute).
Example
More cakes! Here, a
charset is defined, as they’re special Japanese
cakes:
<a href="cakes-ja.html" charset="euc-jp">lovely range of
Japanese cakes (note: this link will take you to a page in Japanese
language)</a>
Value
This attribute takes a standard
character set encoding name (such as
"UTF-8").
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| None | None | None | None | None | None | None | None | None | None | None | None | None | None | None |
None of the browsers tested appear to do anything to notify the user that the linked document would be presented in any special (or different) character encoding. As such, this attribute has no real use, and can safely be ignored at this time.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.