← Lesson
BitWithBite
Full-Stack · Quick Reference

Lesson 2 — HTML Document Structure Cheat Sheet

Full-Stack
In one line: Every HTML page starts with the same boilerplate — doctype, html, head, and body — that tells the browser how to interpret the page.

Key Ideas

1<!DOCTYPE html> tells the browser to use standards mode HTML5.
2<html lang="en"> the root element; lang aids accessibility and SEO.
3<head> holds metadata — title, charset, viewport, links to CSS.
4<body> holds everything visible on the page.
5meta viewport is required for the page to be responsive on mobile.

Boilerplate

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Page Title</title> </head> <body> </body> </html>