W3Schools.com

HTML <link> charset Attribute

HTML link Tag Reference HTML <link> tag

Example

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

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Note: The charset attribute is not supported in any of the major browsers.


Definition and Usage

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 values:

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

In theory, any character encoding can be used, but no browser understands all of them. The more widely a character encoding is used, the better the chance that a browser will understand it.

To view all available character encodings, go to our Character sets reference.



HTML link Tag Reference HTML <link> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE