TutreNews Learn

Document structure

The HTML document

Goal: Write the standard skeleton of every page · 8 min

Every page shares the same skeleton:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Page title</title>
  </head>
  <body>
    visible content
  </body>
</html>
  • <!DOCTYPE html> switches browsers to standards mode.
  • lang tells screen readers and translators which language the text is in (de for German).
  • <head> holds metadata: character encoding, viewport for mobile, the title shown in tabs and search results, links to CSS.
  • <body> holds everything visible.

Worked example: A minimal German page

  1. lang="de" for correct pronunciation by screen readers.
  2. charset utf-8 so that ä, ö, ü and ß display correctly.
  3. A descriptive title for the browser tab.
<!DOCTYPE html>
<html lang="de">
<head>
  <meta charset="utf-8">
  <title>Über uns</title>
</head>
<body>
  <h1>Über uns</h1>
</body>
</html>