Unit 2 of 4 · M.Sc IT Sem 2

Unit 2: Lists, graphics, tables, links and frames

Web Technologies notes · PTU syllabus (PGCA1909)

3 min read7 topics10 exam questions
On this page
  1. Unit summary
  2. Unordered, ordered and definition lists
  3. Adding graphics with border, width, height, align and alt
  4. Tables: headers, captions, cell padding, cell spacing, colspan and rowspan
  5. Internal and external hyperlinks
  6. Image hyperlinks and image maps
  7. Image maps
  8. Frames, framesets and cascading style sheets
  9. Key terms
  10. Quick revision
  11. Important questions

Unit summary

Lists, images, tables, links, frames and style sheets turn plain text into usable pages. This unit covers unordered, ordered and definition lists, graphics with border, width, height, align and alt, tables with headers, captions, cell padding and spacing, colspan and rowspan, internal, external and image hyperlinks, frames and framesets, and cascading style sheets.

After this unit you can

  • Create unordered, ordered and definition lists
  • Insert graphics with attributes
  • Build tables and hyperlinks, including image links
  • Use frames and cascading style sheets

PTU syllabus topics

  • Unordered/ordered/definition lists
  • graphics attributes (border, width/height, align, alt)
  • tables (header, caption, cell padding/spacing, colspan/rowspan)
  • internal/external hyperlinks and image hyperlinks
  • frames and framesets
  • Cascading Style Sheets
ComparisonHTML list types
Tag
Shows

Unordered

<ul> with <li>

Bullets

Ordered

<ol> with <li>

Numbers or letters

Definition

<dl> with <dt> and <dd>

Terms and descriptions

1

Topic 1

Unordered, ordered and definition lists

ComparisonHTML lists
Tags
Use

Unordered

<ul> with <li>

Bulleted items where order doesn't matter

Ordered

<ol> with <li>

Numbered steps; type="1", "A", "a", "I", "i"

Definition

<dl>, <dt>, <dd>

Terms and their descriptions

html<ol type="I">
  <li>Admission</li>
  <li>Registration</li>
</ol>
2

Topic 2

Adding graphics with border, width, height, align and alt

<img src="campus.jpg" alt="SBS campus" width="400" height="250" border="1" align="left">

  • src: path of the image (required).
  • alt: text shown if the image fails to load, and read by screen readers — also important for SEO.
  • width/height: size in pixels.
  • border/align: older attributes, now usually done with CSS.
3

Topic 3

Tables: headers, captions, cell padding, cell spacing, colspan and rowspan

Tag or attributePurpose
<table>Creates the table
<tr>A table row
<th>A header cell (bold, centred)
<td>A data cell
<caption>A title for the table
cellpaddingSpace inside each cell
cellspacingSpace between cells
colspanMakes a cell span several columns
rowspanMakes a cell span several rows
html<table border="1" cellpadding="5">
  <caption>Timetable</caption>
  <tr><th>Day</th><th colspan="2">Lectures</th></tr>
  <tr><td>Monday</td><td>C++</td><td>OS</td></tr>
</table>
4

Topic 4

Internal and external hyperlinks

Links are made with the anchor tag <a href="...">.

  • External link: <a href="https://www.sbs.ac.in" target="_blank">SBS</a> (opens in a new tab).
  • Internal link (same page): give the target an id — <h2 id="fees">Fees</h2> — and link to it with <a href="#fees">Go to fees</a>.
  • Link to another page: <a href="contact.html">Contact</a>.
  • Image link: put an <img> inside <a>.
  • Email link: <a href="mailto:info@sbs.ac.in">Email us</a>.
5

Topic 5

Image hyperlinks and image maps

html<!-- an image used as a link -->
<a href="https://www.sbs.ac.in" target="_blank">
  <img src="sbs-logo.png" alt="SBS home page" width="120">
</a>
6

Topic 6

Image maps

  • Image map: an image with clickable regions linking to different pages.
html<img src="india.png" alt="Map of India" usemap="#states">
<map name="states">
  <area shape="rect" coords="10,10,100,80" href="punjab.html" alt="Punjab">
  <area shape="circle" coords="200,150,40" href="delhi.html" alt="Delhi">
  <area shape="poly" coords="300,50,350,120,260,120" href="rajasthan.html" alt="Rajasthan">
</map>
7

Topic 7

Frames, framesets and cascading style sheets

Frames divide the browser window into parts, each showing a different page, using <frameset cols="25%,75%"> and <frame src="menu.html">. Frames are obsolete in HTML5; <iframe> is used to embed one page inside another. CSS (Cascading Style Sheets) controls presentation — colours, fonts, spacing and layout — separately from HTML structure.

ComparisonWays to add CSS
How
Best for

Inline

style attribute on a tag

A single element

Internal

<style> block in the head

One page

External

A separate .css file linked with <link>

A whole website

cssh1 { color: #0b6b3a; font-family: Arial; }
.highlight { background-color: yellow; }
#footer { text-align: center; }

Selectors: element (h1), class (.highlight) and id (#footer). "Cascading" means that when rules conflict, the more specific or later rule wins.

Key terms

Definition list
List of terms and descriptions using dl, dt and dd
alt attribute
Text alternative for an image
colspan
Attribute making a cell span several columns
Image hyperlink
Image that acts as a link
CSS
Style sheet language controlling presentation

Quick revision

  • ul, ol (type, start), dl, dt, dd.
  • img src, alt, width, height, border, align.
  • table, tr, th, td, caption; cellpadding, cellspacing, colspan, rowspan.
  • a href; internal (#id), external, image links; target.
  • frameset, frame, iframe; inline, internal and external CSS; selectors.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Distinguish ordered and unordered lists.
  2. Q2.Why is the alt attribute important?
  3. Q3.Distinguish cellpadding and cellspacing.
  4. Q4.How do you make an image a hyperlink?
  5. Q5.What is a frameset?
  6. Q6.Name the three ways of applying CSS.

Long-answer questions

  1. Q1.Explain lists and graphics in HTML with examples.
  2. Q2.Design a timetable using table attributes.
  3. Q3.Explain internal, external and image hyperlinks and image maps.
  4. Q4.Explain frames and cascading style sheets.

Stuck on this unit?

Message SBS on WhatsApp for help with Web Technologies, or to ask about studying M.Sc IT at Synetic.

WhatsApp us