What is HTML charset Attribute?

HTML, HTML Attributes 0 Comments

The 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

	<meta charset="UTF-8">

Script Example

<script src="main.js" charset="UTF-8"></script>

Browser Support

meta Yes Yes Yes Yes Yes
script Yes Yes Yes Yes Yes

Leave a Reply

Your email address will not be published.