<htmlstart/>

HTML Basic Structure

Every HTML page shares the same basic skeleton.

The HTML Skeleton

Every HTML document starts with the same fundamental structure:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Page Title</title>
  </head>
  <body>
    <!-- Your content goes here -->
  </body>
</html>

What Each Part Does

TagPurpose
<!DOCTYPE html>Tells the browser this is HTML5
<html lang="en">Root element, sets page language
<head>Metadata — title, charset, links to CSS
<meta charset="UTF-8">Enables all Unicode characters (emojis, accents)
<meta name="viewport">Makes page responsive on mobile
<title>Tab/bookmark title shown in the browser
<body>Everything visible on the page
Always include the viewport meta tag — without it your page will look zoomed out on phones.
🧩

Test Yourself

4 questions
Q1.Which tag wraps the entire HTML document?
Q2.Where does the visible page content go?
Q3.What does <!DOCTYPE html> declare?
Q4.Where do stylesheets and <meta> tags belong?