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

<head>
	<meta charset="UTF-8">
</head>

Script Example

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

Browser Support

Element
metaYesYesYesYesYes
scriptYesYesYesYesYes
Spread the love

Leave a Reply

avatar
  Subscribe  
Notify of