After this lecture, students will be able to:
- explain ordered, unordered, and description lists
- choose appropriate list type for specific content
- insert and optimize images in web pages
- apply responsive image techniques
BMC201 - Web Technology
2026-02-02
Lecture 5
HTML Lists, Images & Hyperlinks
Week 2 | Unit I: Web Page Designing
BMC201 - Web Technology
Mr. Prashant Kumar Nag, Assistant Professor
Learning Outcomes
After this lecture, students will be able to:
Prerequisites
Syllabus Mapping
Syllabus mapping:
Prerequisites used:
Agenda
Introduction and Motivation
Think About It - Interactive Questions
Before we dive into details, think about these:
<figure> and <figcaption> instead of just <img> alone?HTML List Types at a Glance
flowchart LR Lists["HTML Lists"] UL["ul - Unordered\nBullet Points"] OL["ol - Ordered\nNumbered Steps"] DL["dl - Description\nTerm + Definition"] Lists --> UL Lists --> OL Lists --> DL UL --> EX1["Shopping list\nNavigation menu"] OL --> EX2["Recipe steps\nRanking"] DL --> EX3["Glossary\nFAQ pairs"]
HTML List Types
Unordered List
<ul>Ordered List
<ol>Description List
<dl>Unordered Lists <ul>
Best for items with no specific order:
Renders as: - First item - Second item - Third item - Fourth item
Each <li> is one bullet point
Ordered Lists <ol>
Use when sequence or ranking matters:
Renders as: 1. First step 2. Second step 3. Third step 4. Fourth step
Automatically numbered by browser
Nested Lists
You can put lists inside other lists:
Indentation shows hierarchy
Definition/Description Lists
Perfect for term-definition pairs:
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language - structure</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets - styling</dd>
</dl><dt> = term<dd> = definition (indented)Images in HTML
The <img> tag embeds images in web pages:
Key attributes: - src: Path to image file - alt: Alternative text (for accessibility) - width, height: Size in pixels - title: Tooltip on hover
Image File Formats
PNG - Lossless, supports transparency, good for graphics
JPEG - Lossy, smaller file size, best for photos
GIF - Animated, limited colors, mostly for simple images
WebP - Modern format, smaller files, better quality
SVG - Vector format, scales infinitely, perfect for logos
Image File Paths
Relative paths (recommended):
<img src="images/photo.jpg" alt="Description">
<img src="../images/logo.png" alt="Logo">
<img src="./images/icon.png" alt="Icon">Absolute paths (not recommended):
<img src="https://example.com/images/photo.jpg" alt="Photo">
<img src="C:/Users/Name/Pictures/photo.jpg" alt="Photo">Use relative paths - they work when you move files!
Responsive Images
Make images adapt to screen size:
Or using attributes:
Image shrinks on mobile, stays fixed on desktop
Best Practices for Images
alt text - Helps accessibility & SEOimages/ folderComplete Image Example
<figure>
<img src="images/portrait.jpg"
alt="Portrait of John Doe"
width="300"
height="400"
style="max-width: 100%; height: auto;">
<figcaption>John Doe - 2026</figcaption>
</figure><figure>: Container for image + caption<figcaption>: Image descriptionResources & References
Structured Debug Checklist for Lists & Images
Investigation order when images don’t display:
For lists not displaying correctly:
Memory Booster: Real World Connections
HTML list types match their real-world counterparts:
<ul> = Shopping bag - items tossed in, no particular order (groceries, features, links)<ol> = Step-by-step manual - sequence matters, skipping a step causes errors (recipes, instructions)<dl> = Dictionary entry - term followed by its definition (glossaries, FAQs, metadata)<img> = Picture frame - the frame (tag) holds the picture (src) and the caption (alt) explains italt text = Audio description for people who cannot see the imageChoose the list that matches the real-world meaning of your content!
Live Demo: Lists & Images in Action
Interactive demonstration showing HTML lists, images, and figure elements:
?? Open Interactive Demo: HTML Lists & Images
What you’ll see:
?? Key insight: Always write alt text as if you were describing the image to someone on the phone!
Summary
After this lecture, you should understand:
Exam Preparation Questions: Short
alt text required for images?<figure>?<figcaption>?Exam Preparation Questions: Long
<ul>, <ol>, and <dl> with examples.Practice Task
<ul>, <ol>, and <dl>alt text<figure> and <figcaption> for one imageChecklist
Can you:
Next Lecture
HTML Lists, Images & Hyperlinks
Next: Lecture 6 - HTML Hyperlinks & Tables