New: Complete Beginner's Guide to Coding is now available in Premium
Updated: Indian Govt Exam roadmaps now include salary breakdowns & timelines
Tip: Use the Career Hub to explore all career paths in one place
Tutorials HTML HTML Basic Structure

HTML Basic Structure

HTML

Every HTML page has a basic structure. Think of it as the skeleton of a web page.

The Structure

  • <!DOCTYPE html> — Tells the browser this is HTML5
  • <html> — The root element
  • <head> — Contains meta info (title, CSS links)
  • <body> — Contains visible content
Example — HTML
<!DOCTYPE html>
<html>
<head>
    <title>My Page</title>
</head>
<body>
    <h1>Welcome!</h1>
    <p>This is a complete HTML page.</p>
</body>
</html>
Result

Welcome!

This is a complete HTML page.