Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | <link> charset Attribute

Improve Article
Save Article
  • Last Updated : 28 Jun, 2019
Improve Article
Save Article

The HTML <link> charset Attribute is used to specify the character encoding for the HTML linked document. The charset attribute could be overridden by using the lang attribute of any element. It is not supported by HTML 5.

Syntax:

<link charset="character_set">

Attribute Values: It contains single value character_set which specify the character encoding for the HTML document. The values of character_set are:

  • UTF-8: It specify the character encoding for Unicode.
  • ISO-8859-1: It specify the character encoding for the Latin alphabet.

Example:




<!DOCTYPE html> 
<html
  
<head
    <title
        HTML link charset Attribute 
    </title>
</head
  
<body style="text-align:center"
    <H1>GeeksforGeeks</H1
      
    <h2>HTML link charset Attribute</h2
      
    <link href="gfg.html" charset="ISO-8859-1"
</body
  
</html

Output:

Supported Browsers: The browser supported by HTML <link> charset attribute are listed below:

  • Google Chrome: Not Supported
  • Internet Explorer: Not Supported
  • Firefox: Not Supported
  • Safari: Not Supported
  • Opera: Not Supported
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!