HTML | <link> charset Attribute

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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

chevron_right


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

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.