My HTML does not work: the 8 most common mistakes
Unclosed tags, wrong file names, encoding and more.
All lessons · HTML lessons: learn from scratch
8 typical mistakes
- Unclosed tag: <p> opened with no </p> — the rest of the page breaks.
- Wrong nesting: write <b><i>…</i></b>, not <b><i>…</b></i>.
- File name: a hidden .txt, like index.html.txt (show file extensions in Windows).
- Image path and case: Cat.jpg ≠ cat.jpg.
- Missing quote: href="a.html (no closing quote).
- Encoding: no <meta charset="utf-8"> — letters like ə, ö, ş break.
- The browser shows an old copy: hard-refresh with Ctrl+F5.
- You did not save the file (Ctrl+S).
Tools for checking
Press F12 in the browser and open Elements: it shows how the browser understood your HTML. For an official check use validator.w3.org.