Skip to main content

HTML Guide

The character encoding was not declared. Proceeding using “windows-1252”.

Add a meta tag specifying the character encoding in the document’s <head> section.

HTML documents must explicitly declare their character encoding to ensure browsers correctly interpret all characters. The recommended way is using the meta charset element, which should appear as early as possible within the <head>. UTF-8 is the most widely used encoding and should be preferred for web content, but based on the page content, the “windows-1252” encoding is suggested.

Example of a complete HTML5 document with UTF-8 encoding:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Character Encoding Example</title>
  <meta charset="utf-8">
</head>
<body>
  <p>Hello, world!</p>
</body>
</html>

Place the <meta charset="utf-8"> tag before any content in the <head> to avoid encoding issues.

Learn more:

Related W3C validator issues