HTML Basics Lessons
Web DevelopmentBeginner

Build Your First Web Page with HTML

Learn headings, paragraphs, lists, links and images in HTML with short exercises and a sample page that you can edit and preview on your own computer.

Quick Reference

Core Semantic HTML Elements
TagPurposeExample
<h1> – <h6>Document headings by hierarchy<h1>Project Notes</h1>
<p>Text paragraph<p>Welcome to class.</p>
<ul> / <ol>Unordered or numbered list<ul><li>Step 1</li></ul>
<a href>Hyperlink to another page or section<a href="#top">Back to top</a>
<img src alt>Embedded image with accessible text<img src="map.png" alt="Campus map">

Core Concepts

Document Skeleton

Every modern HTML page begins with <!doctype html>, followed by <html>, <head> (metadata), and <body> (visible content).

Proper Nesting

Close inner tags before outer tags: <p><strong>Note</strong></p> is valid; overlapping tags break layout.

Semantic Landmarks

Use <header>, <nav>, <main>, <article>, and <footer> instead of generic <div> boxes so screen readers can navigate.

Accessible Alt Text

Write concise, descriptive alt attributes on meaningful images and empty alt='' on purely decorative icons.

Self-Check Practice

1. What is the difference between <ul> and <ol>?

Show worked answer

<ul> creates a bulleted (unordered) list; <ol> creates a numbered (ordered) list.

2. Why should a page use heading levels in order (h1 → h2 → h3)?

Show worked answer

Proper heading order conveys document structure clearly to both readers and assistive tools.

Study Notes

  • Indent nested HTML tags by two spaces so missing closing tags jump out visually.
  • Open your .html file locally in a browser and refresh after every small edit.