Year 11 · ICT · Spring 1

Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Website authoring under time

Exam practice21.2b HTML body: text, tables and media21.2c Hyperlinks and file paths21.3a CSS: rules, classes, backgrounds and fonts

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

You will learn to

  • Use HTML to mark up headings, lists, a table and images with alt text and sizes.
  • Create hyperlinks with relative paths, and links that open in a new window.
  • Attach an external stylesheet with a relative path.
  • Use the mark scheme to mark your website task and log the lost marks.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Success criteria

You have got it when you can say:

  • I can build the page so it matches the specification.
  • I can test every link and show that it works.
  • I can show evidence of my HTML and my stylesheet.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Retrieval starter

Questions from before. Write your answers, then show them.

  1. Last lesson

    A stylesheet is attached with…

    A <link rel="stylesheet" href="styles.css"> in the headB <style> in the bodyC <css>

    A. <link rel="stylesheet" href="styles.css"> in the head

  2. Last unit

    A .pdf is used because…

    A It is the smallest fileB It looks the same on every computerC Anyone can edit it

    B. It looks the same on every computer

  3. Earlier this year

    Double data entry is…

    A VerificationB Proof-readingC Validation

    A. Verification

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Key words (1 of 5)

HTML
HyperText Markup Language: the language of the content layer of a web page.
CSS
Cascading Style Sheets: the language of the presentation layer, which sets how a page looks.
Tag
A word in angle brackets, such as `<p>`, that marks the start or end of an element.
Attribute
Extra information inside an opening tag, written name="value", such as src or alt.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Key words (2 of 5)

Head
The part of a page holding information about it: title, meta tags, stylesheet links.
External stylesheet
A separate .css file attached to pages with the link element.
Inline style
CSS written in a style attribute inside one tag; it affects only that element.
Class
A label given to elements with the class attribute so CSS can style them as a group.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Key words (3 of 5)

Selector
The part of a CSS rule that says which elements it styles, such as h1 or .note.
Generic font family
A fallback type of font (serif, sans-serif, monospace) used if named fonts are missing.
Bookmark
A named place on a page, made with an id, that a hyperlink can jump to.
Hyperlink
Clickable text or an image that goes to another place, made with the a tag.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Key words (4 of 5)

Relative path
A file location described from the current file's folder, such as images/logo.png.
Absolute path
A full file location from the very start, such as a full URL or C:/...
Target
The attribute that sets which window a link opens in, such as _blank.
colspan / rowspan
Attributes that make a table cell stretch across columns or down rows.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Key words (5 of 5)

Padding
The space inside an element or cell between its border and its content.
Alt text
Alternative text for an image, read by screen readers and shown if the image fails.

21.2b HTML body: text, tables and media · The explanation · step 1 of 18 · part 1 of 2

Headings and paragraphs

`<h1>` is the main heading. `<h2>` is a subheading. `<h3>` is a heading inside an h2 section.

`<p>` is a paragraph. The browser adds space before and after it.

Use headings in order. Choose the tag for what the text is, not for how big it looks. CSS controls the size.

<h1>Café Retiro</h1>
<h2>Breakfast</h2>
<h3>Served until 12:00</h3>
<p>Fresh coffee, toast with tomato and olive oil, and homemade cakes.</p>

21.2b HTML body: text, tables and media · The explanation · step 1 of 18 · part 2 of 2

Headings and paragraphs (continued)

?Why?

Search engines and screen readers use headings to understand the page. A blind visitor can jump from heading to heading.

21.2b HTML body: text, tables and media · The explanation · step 2 of 18 · part 1 of 3

Ordered and unordered lists

An unordered list `<ul>` shows bullet points. Use it when order does not matter.

An ordered list `<ol>` shows numbers. Use it when order matters, such as steps or a top 3.

Each item goes in `<li>` (list item), inside the ul or ol.

21.2b HTML body: text, tables and media · The explanation · step 2 of 18 · part 2 of 3

Ordered and unordered lists (continued)

<ul>
    <li>Café con leche</li>
    <li>Tostada con tomate</li>
    <li>Tarta de Santiago</li>
</ul>

<ol>
    <li>Choose a cake.</li>
    <li>Pay at the counter.</li>
    <li>Collect your order.</li>
</ol>

21.2b HTML body: text, tables and media · The explanation · step 2 of 18 · part 3 of 3

Ordered and unordered lists (continued)

!Watch out

An li must be inside a ul or ol. A list item on its own is invalid HTML.

21.2b HTML body: text, tables and media · The explanation · step 3 of 18 · part 1 of 4

div and classes

A `<div>` is a box that groups other elements. On its own it changes nothing you can see.

A class is a label you give to elements with the class attribute. CSS can then style everything with that label.

Many elements can share one class. One element can have two classes, separated by a space.

21.2b HTML body: text, tables and media · The explanation · step 3 of 18 · part 2 of 4

div and classes (continued)

<div class="offer">
    <h2>Today's offer</h2>
    <p>Coffee and a croissant for €3.20.</p>
    <p class="note">Until 11:00 only.</p>
</div>

21.2b HTML body: text, tables and media · The explanation · step 3 of 18 · part 3 of 4

div and classes (continued)

/* every element with class="offer" */
.offer {
    background-color: #FFF3E0;
    border: 2px dashed #8B4513;
    padding: 10px;
}

.note {
    font-style: italic;
}

21.2b HTML body: text, tables and media · The explanation · step 3 of 18 · part 4 of 4

div and classes (continued)

?Why?

A class lets you style some paragraphs differently without changing every paragraph.

21.2b HTML body: text, tables and media · The explanation · step 4 of 18 · part 1 of 3

Tables: table, tr, th, td

`<table>` starts a table. Each row is a `<tr>` (table row).

Inside a row, each cell is a `<td>` (table data) or a `<th>` (table header). Header cells are bold and centred by default.

Build a table row by row, from top to bottom. In each row, write the cells from left to right.

21.2b HTML body: text, tables and media · The explanation · step 4 of 18 · part 2 of 3

Tables: table, tr, th, td (continued)

<table>
    <tr>
        <th>Drink</th>
        <th>Price</th>
    </tr>
    <tr>
        <td>Café con leche</td>
        <td>€1.80</td>
    </tr>
    <tr>
        <td>Té verde</td>
        <td>€1.60</td>
    </tr>
</table>

21.2b HTML body: text, tables and media · The explanation · step 4 of 18 · part 3 of 3

Tables: table, tr, th, td (continued)

!Watch out

Every row must be closed with `</tr>` before the next `<tr>`. A missing closing tag can shift cells into the wrong row.

The explanation · 14 more steps

More on the lesson page

The lesson page has the rest of the explanation, step by step:

  • Merging cells: colspan and rowspan
  • Table and cell sizes
  • Images
  • Sound and video
  • Bookmarks and links to them
  • Links to pages, websites and email
  • Target windows: _blank, _self and named windows
  • Relative and absolute paths
  • Why absolute paths to local files break
  • How a CSS rule is written
  • Inline styles and external stylesheets
  • Classes in CSS
  • Backgrounds: colour and image
  • Fonts: family, size, colour, alignment, bold, italic

Open the lesson page

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Try it: Edit HTML, see the page

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Quick quiz · 1 of 3

An anchor (bookmark) link…

  1. A Opens a new site
  2. B Jumps to a place on the same page
  3. C Opens an email

B. Jumps to a place on the same page

href="#top" jumps to id="top".

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Quick quiz · 2 of 3

font-family: Arial, Helvetica, sans-serif; means…

  1. A Only sans-serif
  2. B Use all three at once
  3. C Use Arial; if missing, Helvetica; otherwise any sans-serif

C. Use Arial; if missing, Helvetica; otherwise any sans-serif

Fallbacks, ending with a generic family.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Quick quiz · 3 of 3

If inline, internal and external styles disagree, the winner is…

  1. A External
  2. B Internal
  3. C Inline

C. Inline

Inline beats internal beats external.

Year 11 · ICT · Paper 3 practice: spreadsheets and websites · Lesson 2 of 5

Exit ticket

Answer on paper before you go. Then check.

  1. Keeping the aspect ratio means…

    A Only the width changesB The image is croppedC Width and height change together so nothing stretches

    C. Width and height change together so nothing stretches Drag a corner, not a side.

  2. Cropping…

    A Flips itB Makes it brighterC Cuts away part of the image

    C. Cuts away part of the image Keep only the part you want.