Chapter 3 — HTML Lists, Links & Images

📚 Chapter Overview

A website without navigation or media is just a document. In this chapter, you will learn how to organize information into lists, connect pages using hyperlinks, and add visual appeal with images.

Learning Objectives:

3.1 Ordered and Unordered Lists

Part 1 — Definition

Lists help group related items. Unordered Lists (<ul>) use bullets and are for items where order doesn't matter. Ordered Lists (<ol>) use numbers and are for steps or rankings. Each item in the list is defined by an <li> tag.

Part 2 — Syntax

<ul>
    <li>Item 1</li>
</ul>

<ol>
    <li>Step 1</li>
</ol>

Part 3 — Example

Problem: Create a simple navigation menu and a task list.

index.html
<h3>Menu</h3>
<ul>
    <li>Home</li>
    <li>About</li>
</ul>

<h3>Ranking</h3>
<ol>
    <li>Gold</li>
    <li>Silver</li>
</ol>

Part 4 — Video

Video: Coming Soon


3.2 Hyperlinks and Images

Part 1 — Definition

Links (<a>) connect the web. They use the href attribute to specify the destination. Images (<img>) are self-closing tags that use the src attribute to point to a file and alt for accessibility.

Part 2 — Syntax

<a href="https://google.com">Go to Google</a>
<img src="image.jpg" alt="Description">

Part 3 — Example

Problem: Display a logo that links to the home page.

index.html
<a href="index.html">
    <img src="logo.png" alt="Company Logo" width="100">
</a>

Observation: Wrapping an <img> inside an <a> tag makes the image clickable.

Part 4 — Video

Video: Coming Soon


🏆 Chapter Challenge

Challenge Objective

Build a "Mini Photo Gallery" with descriptive text and navigation.

Requirements

Step-by-Step Process

  1. Use <ul> for the gallery structure.
  2. Use <li> to hold each item (image + text + link).
  3. Ensure all images have alt text.

Expected Deliverables

Solve in Editor