Horje

How to add An external JavaScript with an UTF-8 character set

The script charset attribute.

index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The script charset attribute</h1>

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

<p>The Greek characters display correctly because they are part of the "UTF-8" character set.</p>
<p>Try changing character sets to "ISO-8859-1" (default), "windows-1252" or "UTF-16".</p>

</body>
</html>

Output should be:

How to add An external JavaScript with an UTF-8 character set




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin