🔗 HTML

Lists, Images & Links

⏱ 2 hr3 topicsInteractive
🎯 By the end: You can build numbered and bulleted lists, place an image with proper attributes, and create links to other pages, to email and to new tabs.

Three things make web pages useful: lists organise information, images illustrate it, and links connect pages into a whole website. This chapter covers all three (CBSE 165).

1Ordered and unordered lists

HTML has two kinds of list, each holding list items written with <li>:

  • Ordered list <ol> — numbered (1, 2, 3 …). Attributes: type (1, A, a, I, i) and start (the first number).
  • Unordered list <ul> — bulleted. Attribute: type (disc, circle, square).
<ol type="A" start="3">
  <li>Item</li>
  <li>Item</li>
</ol>
Use an ordered list when sequence matters (steps in a recipe) and an unordered list when it doesn't (a shopping list).
Lists playground▶ live preview
index.html
Preview
Key points
  • <ol> makes a numbered list; type can be 1, A, a, I or i and start sets the first number.
  • <ul> makes a bulleted list; type can be disc, circle or square.
  • Both contain list items written with <li> ... </li>.

2Inserting images

The <img> tag places an image. It is an empty tag (no closing tag) and relies on attributes:

AttributeMeaning
srcThe image file's address (path or URL) — required
altAlternate text shown if the image can't load (and read by screen readers)
widthWidth in pixels
heightHeight in pixels
<img src="logo.png" alt="Vidaara logo" width="120" height="80">
Always give a meaningful alt — it keeps your page usable when the image is missing or for visually-impaired users.
Key points
  • <img> is an empty tag; src (the file address) is required.
  • alt gives alternate text shown when the image can't load and read by screen readers.
  • width and height set the image size in pixels.

3Linking pages with the anchor tag

The anchor tag <a> creates a hyperlink. Its main attributes:

AttributeDoes
hrefThe destination — another page, a website, or a section
targetWhere to open it; _blank opens a new tab
<a href="about.html">About us</a>
<a href="https://vidaara.org" target="_blank">Visit Vidaara</a>
<a href="mailto:help@vidaara.org">Email us</a>

A special form, href="mailto:...", opens the user's email app to write to that address. You can also wrap an image in an anchor to make the image clickable.

Links playground▶ live preview
index.html
Preview
Key points
  • <a href="..."> makes a hyperlink; the text (or image) between the tags is what you click.
  • target="_blank" opens the link in a new tab.
  • href="mailto:address" opens the email app to write to that address.

★ Practical: a mini links page

Build one page that contains:

  1. An ordered list of three steps and an unordered list of three items.
  2. An image with src, alt, width and height.
  3. A link to another website that opens in a new tab.
  4. A mailto link and one clickable image.

Ready for the chapter test?

Answer 5 questions. Score 60% or more to mark this chapter complete.

Start the test →

💡 Log in to save your progress and earn the certificate.