Revision Notes
OxfordAQA IGCSE Computer Science (9210): Hypertext Markup Language (HTML) – Revision Notes
Revision notes for OxfordAQA IGCSE Computer Science 9210 section 3.8.2: HTML tags, CSS rules with type and class selectors, properties, HTML5 and a self-test.
- Subject
- Computer Science
- Level
- IGCSE
- Topic
- Topic 8: Web page design
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to OxfordAQA IGCSE Computer Science (9210), For teaching from September 2017, exams from May/June 2019. Official specification .
Syllabus page (what it covers and how it is assessed): OxfordAQA IGCSE Computer Science.
Syllabus points this page covers
9210
- 3.8.2 Hypertext Markup Language (HTML)
This page covers 1 of the 2 subtopics in topic 8, Web page design.
Found an error? Report a correction.
Need help with this topic? Request a free trial class for IGCSE Computer Science (9210).
Condensed notes for section 3.8.2 Hypertext Markup Language (HTML) of OxfordAQA International GCSE Computer Science (9210). Explanations and a complete example are in the HTML study guide.
What the specification asks
- Create the structure of a web page using HTML tags from the list.
- Use basic CSS to control the layout. A style rule has a selector, a property and a value.
- Know two selectors: type and class. Exam questions use embedded style sheets only.
- Know the properties:
background-color,color,text-align,font-family,font-size,font-weight,font-style. - Be aware of the key differences between HTML5 and earlier versions.
Tags
| Group | Tags |
|---|---|
| General | <html>, <title>, <body>, <style> |
| Block-level | <div>, <p>, <h#> (h1 to h6), <ol>, <ul>, <li> |
| Inline | <span>, <strong>, <em>, <br />, <a>, <img /> |
- Most tags are paired:
<p> ... </p>. Close tags in the reverse order to opening them. <br />and<img />have no content.- Block-level elements start on a new line and use the full width. Inline elements sit within a line.
<title>and<style>normally sit inside a<head>section before the<body>.
What each tag does
| Tag | Purpose |
|---|---|
<html> |
The whole page |
<title> |
The title on the browser tab |
<body> |
The visible content |
<style> |
Embedded CSS rules |
<div> |
A block container |
<p> |
A paragraph |
<h1> |
The most important heading (to h6, the least) |
<ol> |
A numbered list |
<ul> |
A bulleted list |
<li> |
A list item |
<span> |
An inline container |
<strong> |
Bold (important) text |
<em> |
Italic (emphasised) text |
<br /> |
A line break |
<a href="..."> |
A link; href gives the destination |
<img src="..." alt="..." /> |
An image; src is the file; alt is a text description |
Examples
<ol>
<li>Dig</li>
<li>Plant</li>
</ol>
<p>Meet at the gate.<br />Bring a spade.</p>
<p>This is <strong>very</strong> important.</p>
<p><a href="plants.html">Plant list</a></p>
<img src="rose.jpg" alt="A red rose" />
CSS rules
selector {
property: value;
}
- A colon separates the property and the value; a semicolon ends each pair; curly brackets surround the pairs.
- Type selector: a tag name, such as
p. It affects every element of that type. - Class selector: a full stop and a name, such as
.notice. It affects only the elements withclass="notice". - The full stop appears in the style sheet but not in the
classattribute.
h1 {
color: darkgreen;
text-align: center;
}
.notice {
font-weight: bold;
}
<h1>Garden Club</h1>
<p class="notice">No meeting this week.</p>
<p>The next meeting is on Friday.</p>
Display: the heading in dark green, centred; the first paragraph in bold; the second paragraph unchanged.
CSS properties
| Property | Controls | Example values |
|---|---|---|
background-color |
Background colour | yellow |
color |
Text colour | red |
text-align |
Text alignment | left, center, right |
font-family |
Typeface | Arial |
font-size |
Text size | 20px |
font-weight |
Boldness | bold |
font-style |
Slant | italic |
American spelling is used for color and center.
Embedded style sheet
The CSS goes inside a <style> element in the same HTML file.
<style>
p {
font-family: Arial;
}
</style>
HTML5
| Feature | Detail |
|---|---|
| Fewer add-ons | Supports many facilities that previously needed add-ons |
| Web applications | Better support through scripting and access to many new APIs |
| Multimedia and graphics | <svg>, <canvas>, <audio> and <video> tags |
| Semantic elements | New elements such as <header> and <article> that define parts of a page |
Choosing a selector
| Wanted | Use |
|---|---|
| The same style on every paragraph | Type selector p |
| A style on only some paragraphs | Class selector, such as .notice |
| A style on part of a line | <span class="..."> |
Reading a page: what is displayed?
For each tag and rule, write one effect: <h1> gives a large heading; a rule h1 { color: blue; } makes it blue; <p class="note"> gives a paragraph in the style of the class note; <strong> makes bold text; <ul> with <li> items gives
bullets. Listing the effects in the order of the page earns the marks.
Exam traps
- A closing tag missing, or tags closed in the wrong order.
- List items outside a list, or
<ul>closed with</ol>. <br>instead of<br />.- No full stop in the class selector, or a full stop in the
classattribute. color = redinstead ofcolor: red;.- No semicolons or curly brackets.
colourandcentre. Usecolorandcenter.- CSS written outside
<style>. - A type selector where only some elements should change. Use a class.
- HTML5 “is newer”. Give the specific features.
Key terms
| Term | Meaning |
|---|---|
| Element | An opening tag, its content and its closing tag |
| Attribute | Extra information in an opening tag, such as href="..." |
| Selector | The part of a rule that says which elements it applies to |
| Property | The aspect of appearance that a rule changes |
| Semantic element | An element that describes the meaning of its content |
Self-test
- State the tag pair that creates a paragraph.
- State the tag that creates a line break.
- State the difference between
<ol>and<ul>. - State the attribute that gives the destination of a link.
- Write a CSS rule that makes all paragraphs blue.
- Write a CSS rule for a class called warning that makes text bold.
- Write the HTML for a paragraph that uses the class warning.
- State what
text-align: center;does. - Name two new HTML5 tags that help with multimedia.
- Name one semantic element introduced in HTML5.
Answers:
<p>and</p>.<br />.<ol>makes a numbered list;<ul>makes a bulleted list.href.p { color: blue; }.warning { font-weight: bold; }<p class="warning">text</p>- It centres the text.
- Any two of
<audio>,<video>,<canvas>,<svg>. - For example
<header>or<article>.
More resources on this topic
Related resources
-
Study guides
OxfordAQA IGCSE Computer Science (9210): Key concepts of web page design – Study Guide
Study guide to OxfordAQA IGCSE Computer Science 9210 section 3.8.1: HTML for structure, CSS for style, server-side scripting and client-side scripting.
Computer Science · OxfordAQA · IGCSE
Read guide -
Practice questions
OxfordAQA IGCSE Computer Science (9210): Key concepts of web page design – Practice Questions
Original OxfordAQA IGCSE Computer Science 9210 practice questions with answers on HTML, CSS, server-side scripting and client-side scripting.
Computer Science · OxfordAQA · IGCSE
Try questions -
Revision notes
OxfordAQA IGCSE Computer Science (9210): Key concepts of web page design – Revision Notes
Revision notes for OxfordAQA IGCSE Computer Science 9210 section 3.8.1: HTML and CSS roles, server-side and client-side scripting, comparisons and a self-test.
Computer Science · OxfordAQA · IGCSE
Revise topic
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.