Suggest an editImprove this articleRefine the answer for “What does <meta charset="UTF-8"> do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The **`<meta charset="UTF-8">`** tag tells the browser what encoding the HTML document is written in, so it correctly displays all characters: letters, digits, symbols, spaces, emoji, and so on. **Key point:** The browser reads HTML sequentially from top to bottom, so if the encoding is not specified immediately, a few characters may be read in the wrong system and displayed as garbled text.Shown above the full answer for quick recall.Answer (EN)ImageThe `<meta charset="UTF-8">` tag tells the browser **what encoding the HTML document is written in**, so it correctly displays all characters: letters, digits, symbols, spaces, emoji, and so on. --- ### 1. What is encoding **Encoding** is the way a computer stores and understands text characters. Each character (letter, digit, symbol) has its own **numeric code**. - Older sites often used encodings like `Windows-1251` (for Cyrillic languages) or `ISO-8859-1` (for Western languages). - The modern standard is **UTF-8**, which supports **all languages of the world**, including Cyrillic, Arabic, Chinese, and even emoji. --- ### 2. What `meta charset="UTF-8"` does When the browser opens a page, the first thing it reads is the tag: ```html <meta charset="UTF-8"> ``` and understands: > "All characters in this file must be interpreted using UTF-8 encoding." Thanks to this, text like: ```html <h1>Hello, world!</h1> ``` displays correctly, instead of as "киÑилиÑÑ". --- ### 3. Why it's important to place this tag **at the beginning** of `<head>` The browser reads HTML **sequentially from top to bottom**. If the encoding is not specified **immediately**, it may manage to "read" a few characters in the wrong system and display them as garbled text. Correct: ```html <head> <meta charset="UTF-8"> <title>Home page</title> </head> ``` Incorrect: ```html <head> <title>Home page</title> <meta charset="UTF-8"> </head> ``` --- ### 4. Why specifically UTF-8 - Universal: works with any language. - Supports special characters, emoji, mathematical symbols. - Compatible with most servers and systems. - It is the **official HTML5 standard**. --- ### Summary: | Parameter | Value | |---|---| | Tag | `<meta charset="UTF-8">` | | Purpose | Tells the browser which encoding to use | | What it does | Guarantees correct text display | | Why it matters | Without it: garbled text and character errors | | HTML5 standard | Recommends UTF-8 specifically | --- **In simple terms:** `<meta charset="UTF-8">` tells the browser: > "This page is written in a universal encoding. Show all characters correctly." Without it, Cyrillic text can turn into unreadable characters.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.