Lesson 2 of 8
Document Structure
Every HTML document follows a basic structure. Understanding this structure is essential before you start writing your own pages.
The <!DOCTYPE html> declaration tells the browser this is an HTML5 document. The <html> element is the root element that wraps everything.
Inside <html>, there are two main sections: <head> (metadata, title, links to CSS) and <body> (the visible content).
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Title</title>
</head>
<body>
<!-- Visible content goes here -->
</body>
</html>