Curriculum ▸ HTML Zero → Mastery ▸ Lesson 11: The <meta charset> Tag Foundations

Lesson 11 — The <meta charset> Tag Character Encoding

Learning Goals

Part 1 — What is Character Encoding?

Character encoding maps text (letters, symbols, emojis) to bytes for computers to store and transmit. Without it, browsers don’t know how to display your text properly.

Common encodings in history included ASCII and ISO-8859-1. Today, UTF-8 is the default and supports nearly all characters worldwide.

Part 2 — Using <meta charset>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Example with UTF-8</title>
  </head>
  <body>
    <p>Hello, world! ☕😊</p>
  </body>
</html>

Result: The coffee cup ☕ and smiley 😊 display correctly thanks to UTF-8.

Part 3 — Common Mistakes

Quick Quiz

  1. What does UTF-8 stand for?
  2. Where must <meta charset> be placed in your HTML?
  3. What happens if encoding is missing or wrong?
Sample Answers
  • “Unicode Transformation Format — 8-bit.”
  • At the very top of the <head>.
  • Text may display as random symbols (“mojibake”).

Mini Project — Multilingual Greeting

Create a page with greetings in multiple languages (e.g., English, Spanish, Arabic, Chinese, Hindi). Save with <meta charset="UTF-8"> and confirm all render correctly.

Lesson 11 Dictionary

<meta charset>
Declares character encoding of the document. Use UTF-8.
Mojibake
Unreadable garbled characters shown when encoding is wrong.
UTF-8
Universal encoding supporting nearly all characters, recommended for HTML.