What is HTML charset Attribute?
HTML, HTML Attributes 0 CommentsThe charset
attribute specifies the character encoding for the HTML document if, used in <meta>
tag. But if it is used with <script>
tags then it specifies the character encoding used in an external script file.
Tag Support
You can use this attribute in <meta>
and <script>
tags.
Meta Example
<head> <meta charset="UTF-8"> </head>
Script Example
<script src="main.js" charset="UTF-8"></script>
Browser Support
Element | |||||
---|---|---|---|---|---|
meta | Yes | Yes | Yes | Yes | Yes |
script | Yes | Yes | Yes | Yes | Yes |
Leave a Reply