Open In App

HTML <a> charset Attribute

HTML <a> charset attribute specifies the character encoding for an external resource linked with the HTML anchor element. It ensures proper interpretation of text by defining the character set used in the linked resource.

Note: It is not supported by HTML5.



Syntax:

<a charset="value">

Attribute Values:



It contains the value charset which specifies the character encoding for the external scripts.

HTML <a> charset Attribute Examples

Example: This example display the use of charset attribute of anchor tag




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML a charset Attribute
    </title>
</head>
 
<body>
    <p>Welcome to
        <a charset="UTF-8"
           href="https://ide.geeksforgeeks.org/">
            GeeksforGeeks
        </a>
    </p>
</body>
 
</html>

Output:

Explanation:

Supported Browsers

.

Article Tags :