YouTip LogoYouTip

Att A Charset

## HTML `` charset Attribute The `charset` attribute of the `` (anchor) tag was used to specify the character encoding of the linked document. > ### ⚠️ Deprecation Notice > **The `charset` attribute is deprecated and is no longer supported in HTML5.** Modern web browsers do not support this attribute. It is documented here for historical reference and legacy code maintenance. --- ## Definition and Usage Historically, the `charset` attribute informed the browser about the character set used in the destination document (the URL specified in the `href` attribute). This allowed the browser to correctly decode and display the linked page if its encoding differed from the current page. In modern web development, character encoding is handled directly by the destination server via the HTTP `Content-Type` header (e.g., `Content-Type: text/html; charset=UTF-8`) or declared within the destination document itself using the `` tag. --- ## Syntax ```html Link Text ``` --- ## Attribute Values | Value | Description | | :--- | :--- | | *character_set* | Specifies the character encoding of the linked document. Common values include:
β€’ `UTF-8` - Character encoding for Unicode (recommended)
β€’ `ISO-8859-1` - Character encoding for the Latin alphabet | --- ## Code Example Below is an example of how the `charset` attribute was historically used in a link: ```html Visit YouTip! ``` --- ## Browser Support | Chrome | Edge / IE | Firefox | Safari | Opera | | :---: | :---: | :---: | :---: | :---: | | ❌ Not Supported | ❌ Not Supported | ❌ Not Supported | ❌ Not Supported | ❌ Not Supported | All major modern browsers have dropped support for the `charset` attribute on the `` tag. If used, it will be ignored by the browser. --- ## Modern Alternatives Instead of using the obsolete `charset` attribute on anchor tags, you should ensure that the target document declares its own character encoding. ### 1. HTML5 Meta Tag (Best Practice) Every HTML5 document should declare its character encoding inside the `` section using the `` tag: ```html Document Title ``` ### 2. HTTP Response Header Configure your web server (such as Apache or Nginx) to send the correct charset in the HTTP response headers: ```http Content-Type: text/html; charset=utf-8 ```
← Att A CoordsMongodb Operators Type β†’