The basic structure
Every normal HTML page follows a basic document structure. Understanding this structure makes it easier to organize larger websites.
Learn how websites are structured from the ground up using HTML. Build real pages while learning elements, attributes, links, images, forms, tables, semantic HTML and more.
Lesson 2 of 24
12 min learning time
Every normal HTML page follows a basic document structure. Understanding this structure makes it easier to organize larger websites.
The DOCTYPE declaration tells the browser that the document uses modern HTML.
The head contains information about the document, while the body contains the content displayed on the page.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
</body>
</html>
Practical Exercise
Create a complete HTML document with a title, viewport meta tag, heading and paragraph.
Quick Check
Which section contains content normally displayed to the user?