Example Define the character encoding used in a linked script file: <script type="text/javascript" src="myscripts.j...
Example
Define the character encoding used in a linked script file:<script type="text/javascript" src="myscripts.js" charset="UTF-8"></script> |
Definition and Usage
The charset attribute specifies the character encoding used in an external script file (referred to by the src attribute).The charset attribute is used when the character encoding in an external script file differs from the encoding in the main file.
The default character encoding is ISO-8859-1.
Browser Support
The charset attribute is supported in all major browsers.Syntax
<script charset="value"> |
Attribute Values
Value | Description |
---|---|
character_encoding | The character encoding of an external script file. Some common values:
|