🟧

HTML Fundamentals

Level
8 lessons30 exercises~5h

Learn HTML from scratch with 30 hands-on exercises and a live preview editor. Document structure, text, lists, links and images, tables, forms, semantic HTML and accessibility, all runnable in your browser with instant visual feedback.

01. Document Structure

The skeleton of every web page and the anatomy of a tag.

The anatomy of an element

An HTML element is an opening tag, some content, and a closing tag: <p>Hello</p>. Tags can carry attributes in the opening tag, written as name="value".

The page skeleton

<!DOCTYPE html>
<html>
  <head>
    <title>My page</title>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>
  • <!DOCTYPE html> tells the browser to use modern HTML.
  • <head> holds information about the page, like the <title>.
  • <body> holds everything the visitor sees.
  • Comments look like <!-- a note --> and are not shown.

Exercises (4)

The page skeleton

Write a complete HTML document: a <!DOCTYPE html>, an <html> element containing a <head> with a <title> of My First Page, and a <body> with an <h1> saying Hello.

HTML
Previewlive

Free forever, no ads, no tracking. Support the project