HTML · Beginner

Learn HTML: A Practical Beginner Guide

Understand semantic HTML, document structure, links, forms and accessibility through small practical examples.

HTML gives web pages meaning and structure. Understanding it well improves accessibility, development speed and how content is interpreted by browsers and crawlers.

What you will learn

  1. The HTML document
  2. Semantic elements
  3. Forms and accessibility
CHAPTER 01

The HTML document

Every page starts with a doctype, an html element, and descriptive head and body elements. Use a unique page title and a meaningful description for important pages.

<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><title>My Page</title></head>
<body><h1>Hello!</h1></body>
</html>
CHAPTER 02

Semantic elements

Use header, nav, main, article, section and footer for their intended purposes. Proper headings make long pages easier to scan, and descriptive link text makes navigation clearer.

<main>
 <article>
  <h1>My First Article</h1>
  <p>Meaningful content goes here.</p>
 </article>
</main>
CHAPTER 03

Forms and accessibility

Associate labels with fields, choose the correct input type, and provide instructions and visible feedback. Native elements support keyboard users better than custom controls in many cases.

<label for="email">Email address</label>
<input id="email" type="email" required>

Practice the concepts

Use a related utility to experiment, check examples, and build a small project.

Open HTML live preview ↗