TGViewer
Web Development Web Development @webdevcoursefree ยท 79.7K subscribers
Post #4069 640
๐ŸŒ Web Development Roadmap โ€” Part 14

HTML Document Structure

Before learning individual HTML tags in depth, you need to understand how a complete HTML document is organized.

1. Basic HTML Structure

Every normal HTML page follows a structure similar to this:

<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is my website.</p>
</body>
</html>


Think of it like a building:

HTML Document

โ”œโ”€โ”€

โ”‚ โ”œโ”€โ”€ โ†’ Page information

โ”‚ โ””โ”€โ”€ โ†’ Visible webpage content

2. <!DOCTYPE html>

This tells the browser that the document uses modern HTML.

It is a declaration, not a normal HTML element.

3.

This is the root element of the document.

Almost everything else belongs inside <html>.

4.

The <head> contains information about the webpage.

Common things placed inside it include:

<meta> <link> <style> <script></strong></p>
<p>Much of this information isn't directly displayed as page content.</p>
<p><strong>5. <title></strong><br>
The title usually appears in the browser tab.</p>
<p>It is also important for search engines and accessibility.</p>
<p><strong>6. <body></strong><br>
The <code><body></code> contains the main content users interact with and see.</p>
<p>Examples: Headings, Paragraphs, Images, Links, Buttons, Forms, Lists, Videos</p>
<p><strong>7. <meta></strong><br>
<code><meta></code> provides information about the document.</p>
<p>A very common example is: <code><meta charset="UTF-8"></code><br>
You will also commonly see: <code><meta name="viewport" content="width=device-width, initial-scale=1.0"></code></p>
<p>This helps webpages display properly on mobile devices.</p>
<p><strong>8. <link></strong><br>
<code><link></code> is commonly used to connect external resources to the HTML document.</p>
<p>For example: <code><link rel="stylesheet" href="style.css"></code></p>
<p><strong>9. Complete Example</strong></p>


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Portfolio</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Welcome to My Portfolio</h1>
<p>I am learning web development.</p>
<a href="about.html">About Me</a>
</body>
</html>


10. What Happens When the Browser Opens It?

HTML file โ†’ Read DOCTYPE โ†’ Read html โ†’ Process head โ†’ Load metadata, title, CSS โ†’ Process body โ†’ Build webpage โ†’ Display to user

11. vs

: Information ABOUT the webpage

: Content OF the webpage

๐Ÿง  Double Tap โค๏ธ For More
  • โค 4
More from @webdevcoursefree
  1. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  2. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  3. Oct 5, 2026The browser reads the HTML structure and builds the webpage from these elements. Key Takeaโ€ฆ
  4. Oct 5, 2026๐ŸŒ Web Development Roadmap โ€” Part 13 HTML Syntax, Tags & Elements Now that you understandโ€ฆ
  5. Sep 29, 2026It can contain things such as: โ€ข Page title โ€ข Metadata โ€ข Links to CSS โ€ข Other informationโ€ฆ
  6. Sep 29, 2026๐ŸŒ Web Development Roadmap โ€” Part 12 ๐Ÿ—๏ธ HTML โ€” What Is HTML and Why Do We Need It? HTML iโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’