Lesson 24 of 55
HTMLMetadata – Charset, Viewport, HTTP‑Equiv
8 min
Course progress44%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 24 of 55
HTML8 min
Keep these ideas in mind as you work through the lesson.
<meta charset='UTF-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='author' content='John Smith' />
<meta name='theme-color' content='#317EFB' />
charset – Declares character encoding (UTF‑8 recommended). Must be the first meta tag.http-equiv – Provides HTTP‑header equivalents; X-UA-Compatible forces modern Edge/IE rendering mode.author, theme-color – Metadata for author credit and PWA theming on mobile browsers.Always place the charset meta tag as the first element inside <head> to avoid rendering glitches. The viewport meta tag (see Lesson 25) should follow immediately after.
<meta charset> first in <head>? ✅http-equiv='X-UA-Compatible' present for legacy support? ✅Tip: When you add a language version of a page, also add a
hreflanglink in the head to help search engines serve the correct regional version.