📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials HTML Fundamentals Basic HTML Document

Basic HTML Document

4 min read Quiz at the end
Every HTML page needs DOCTYPE, html, head with charset and viewport meta, a title, and a body tag. The DOCTYPE enables modern browser standards mode. The viewport meta tag is required for proper display on mobile devices.

Your First HTML Page

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>My first HTML page.</p>
</body>
</html>
Topic Quiz · 5 questions

Test your understanding before moving on

1. What does DOCTYPE declare?
💡 <!DOCTYPE html> tells the browser to render in standards mode (HTML5).
2. Where does visible content go?
💡 Visible page content goes inside the <body> element.
3. What goes in <head>?
💡 <head> contains metadata, title, charset, CSS links, and scripts.
4. What does lang="en" on <html> do?
💡 The lang attribute helps assistive technologies and search engines understand the page language.
5. What is the title tag for?
💡 <title> sets the browser tab title and is the most important on-page SEO element.