- Understand ordered, unordered, and definition lists
- Learn when to use each list type
- Insert and optimize images in web pages
- Implement responsive image techniques
BMC201 - Web Technology
2026-02-02
Lecture 5
HTML Lists & Images
Week 2 | Unit I: HTML Forms & CSS Introduction
BMC201 - Web Technology
Mr. Prashant Kumar Nag, Assistant Professor
Learning Objectives
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
Questions?
Next: Lecture 6 - HTML Hyperlinks & Tables