HTML - Charset & Lang

Overview

Estimated time: 10–15 minutes

Setting the language and character encoding ensures correct text rendering and helps assistive tech.

Examples

<html lang="en">
<meta charset="utf-8">

Common Pitfalls

  • Forgetting lang—screen readers may mispronounce content.
  • Using legacy encodings—prefer UTF-8.

Exercises

  1. Set lang to your primary language and verify the screen reader voice.