Last updated
HTML Page Structure
Definition: A complete HTML document has a standard skeleton. Every real web page starts with the same basic structure.
The boilerplate
<!DOCTYPE html> <html> <head> <title>My Page</title> </head> <body> <h1>Welcome</h1> </body> </html>
What each part does
<!DOCTYPE html>— tells the browser this is HTML5<html>— wraps the whole page<head>— hidden info like the page title (shown on the browser tab)<body>— everything visible on the page goes here
Nesting
Tags sit inside other tags, like boxes within boxes. The <body> holds your headings and paragraphs, which is where you will spend most of your time.
💡 Tip: indent nested tags (as above) to keep your code readable as pages grow.
Try it Yourself
Output
Ad · responsive