Character Encoding
Description
Another use for the meta
element is to declare
the character encoding.
Example
An example of this is shown in the following code.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
<meta name="author" content="java2s.com"/>
<meta name="description" content="A simple example"/>
<meta charset="utf-8"/>
</head><!-- w w w. j ava2 s .c om-->
<body>
<p>This is a test.</p>
<a href="http://java2s.com">Visit java2s.com</a>
</body>
</html>
The charset is set to UTF-8 encoding. UTF-8 is a common character encoding.