Answer files for Chapter 21
Answer files for Chapter 21
<!DOCTYPE html>
<html>
<head>
<title>Activity 21a</title>
</head>
<body>
<p>Superscript and subscript in a web page by
Graham Brown</p>
<h1>Enhancing Text</h1>
<p>Text can be enhanced in many ways, it can be
made italic, it can be emboldened and it can be
underlined. Although it is possible to underline this
text, it is not often used as this is usually used to
show a Hyperlink. We will study these later when we
apply CSS styles to our web page.</p>
<p>Different styles can be applied to webpages
and individual characters can be enhanced with
superscript and subscript. Superscript can be used
for area or volume, for example: 10
metres<sup>2</sup> or 500 cm<sup>3</sup>. Subscript
can be used with chemical formulae, for example: the
chemical formula for Carbon dioxide is
CO<sub>2</sub>. Other style elements are set using
the styles h1 to h6, paragraph style and list
style.</p>
</body>
</html> Markup printout
Name placed in correct place 1 mark
Style h1 applied to heading rather than h4 1 mark
Superscript on 2 in 10 metres2 1 mark
Superscript on 3 in 500cm3 1 mark
Subscript on 2 in CO2 1 mark
Sample Answers Activity21b.docx
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
9 by 2 table 1 mark
Rows 1 set as heading 1 mark
Sample Answers Activity21b.docx
Markup printout
<!DOCTYPE html> Student’s name 1 mark
<html>
<!-- Activity 21b - Graham Brown -->
<head>
Table with border attribute 1 1 mark
<title>Activity 21b</title> Caption – Hours of sunshine 1 mark
</head>
<body>
<h2> Activity 21b by Graham Brown </h2>
<table border="1">
<caption>Hours of sunshine</caption>
<thead> Table header defined 1 mark
<tr> Day and Hours cells in header 1 mark
<th>Day</th>
<th>Hours</th>
</tr> Table footer defined 1 mark
</thead> Weekly total and 40 in footer 1 mark
<tfoot>
<tr>
<td>Weekly total</td>
<td>40</td> Table body defined 1 mark
</tr> 7 rows in body section (days of week) 1 mark
</tfoot>
<tbody>
<tr>
<td>Monday</td>
<td>6</td>
</tr>
<tr>
<td>Tuesday</td>
<td>4.5</td>
</tr>
<tr>
<td>Wednesday</td>
<td>8</td>
</tr>
<tr>
<td>Thursday</td>
<td>7</td>
</tr>
<tr>
<td>Friday</td>
<td>3.5</td>
</tr>
<tr>
<td>Saturday</td>
<td>5</td>
</tr>
<tr>
<td>Sunday</td>
<td>6</td>
</tr>
Sample Answers Activity21b.docx
</tbody>
</table>
</body>
</html>
Sample Answers Activity21c.docx
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
6 by 2 table 1 mark
Rows 1 set as heading 1 mark
Sample Answers Activity21c.docx
Markup printout
<!DOCTYPE html> Student’s name 1 mark
<html>
<!-- Activity 21c by your name -->
<head>
<title>Activity 21c</title>
</head>
<body>
<h2> Activity 21c by Graham Brown </h2>
Table with border attribute 1 1 mark
Embedded CSS style attribute used 1 mark
Width set to 70% of window 1 mark
Table centre aligned in window 1 mark
<tr style="height:60px">
<th style="width:100px">Country</th>
<th>Visitors</th>
</tr> Table footer defined 1 mark
</thead> Total visitors and 3000 in footer 1 mark
<tfoot> First footer cell centre aligned 1 mark
<tr>
<td style="text-align:center">Total visitors</td>
<td style="text-align:right">3000</td>
</tr>
</tfoot> Table body defined 1 mark
4 rows in body section 1 mark
<tbody>
<tr>
<td style="text-align:center">Egypt</td>
<td style="text-align:right">440</td>
</tr>
<tr> Correct Country names 1 mark
Correct visitor numbers 1 mark
Country names centre aligned 1 mark
Visitor numbers right aligned 1 mark
<td style="text-align:center">India</td>
<td style="text-align:right">2000</td>
</tr>
<tr>
Sample Answers Activity21c.docx
<td style="text-align:center">Jamaica</td>
<td style="text-align:right">140</td>
</tr>
<tr>
<td style="text-align:center">United Arab
Emirates</td>
<td style="text-align:right">420</td>
</tr>
</tbody>
</table>
</body>
</html>
Sample Answers Activity21d.docx
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
Single solid gridlines and external border 1 mark
Sample Answers Activity21d.docx
Markup printout
Student’s name 1 mark
<html>
<!-- Activity 21d by Graham Brown -->
<head>
<title>Activity 21d</title>
</head>
<body>
<h2> Activity 21d by Graham Brown </h2>
Table with border – collapse: collapse; 1 mark
Border set to "1" 1 mark
Border as embedded CSS including colon 1 mark
set to solid 1 mark
Space then 6px as values for border property 1 mark
</td>
</tr>
<tr>
<td style="border:solid 2px; text-
align:center">Jamaica
</td>
<td style="border:solid 2px; text-align:right">140
</td>
</tr>
<tr>
<td style="border:solid 2px; text-align:center">United
Arab Emirates
</td>
<td style="border:solid 2px; text-align:right">420
</td>
</tr>
</tbody>
</table>
</body>
</html>
Sample Answers Activity21e.docx
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
Single solid gridlines and external border 1 mark
Table border 6px 1 mark
Table header border 6px 1 mark
All table data borders 3px 1 mark
All data entered with 100% accuracy 1 mark
Student names left aligned 1 mark
Test scores right aligned 1 mark
Right column 50% of table width 1 mark
Right column centre aligned 1 mark
Sample Answers Activity21e.docx
Markup printout
<!DOCTYPE html> Student’s name 1 mark
<html>
<!-- Activity 21e by Graham Brown -->
<head>
<title>Activity 21e</title>
</head>
<body>
<h2> Activity 21e by Graham Brown </h2>
</td>
<td style="border:solid 3px; text-align:right">66</td>
<td rowspan="2" style="border:solid 3px; text-
align:center; width:50%;"><p>Must do better.</p></td>
</tr>
<tr>
<td style="border:solid 3px; text-align:left">Fiona
</td>
<td style="border:solid 3px; text-align:right">23</td>
</tr>
</tbody>
</table>
</body>
Sample Answers Activity21f.docx
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
Sample Answers Activity21f.docx
Markup printout
<!DOCTYPE html> Student’s name 1 mark
<html>
<!-- Activity 21f - Graham Brown -->
<head>
<title>Activity 21f</title>
</head>
<body>
<h2> Activity 21f by Graham Brown </h2>
Table with border attribute 1 1 mark
Border NOT collapsed 1 mark
Border-spacing:20px 1 mark
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
5 by 5 table 1 mark
Rows 1 and 2 merged in column 1 1 mark
Columns 2-5 merged in row 1 1 mark
Column 1 set as headings 1 mark
Rows 1 and 2 set as headings 1 mark
Sample Answers Activity21g.docx
Markup printout
<!DOCTYPE html> Student’s name 1 mark
<th colspan="4">Expenses</th>
</tr>
<tr>
<th>Anne</th>
<th>Dan</th> Merged cells, - colspan=”4”
<th>Lisa</th>
<th>Udoka</th>
</tr>
</thead>
<tbody>
<tr style="text-align:right;">
<th>Petrol</th>
<td>$182.20</td>
<td>$185.75</td>
<td>$260.00</td>
<td>$322.00</td>
</tr>
<tr style="text-align:right;">
<th>Food</th>
<td>$80.00</td>
<td>$62.40</td>
<td>$54.00</td>
<td>$40.00</td>
</tr>
Sample Answers Activity21g.docx
<tr style="text-align:right;">
<th>Hotel</th>
<td>$420.00</td>
<td>$382.10</td>
<td>$104.50</td>
<td>$260.00</td>
</tr>
</tbody>
</table>
</body>
</html>
Activity 21h
Activity 21h
<html>
<!-- Activity 21h by Graham Brown -->
<head>
</head>
<body>
<h1>Winter sports</h1>
<p>This website gives you information on some aspects of
winter sports. Here
Markup printout
Use of UL for lists (1 mark per list) 4 marks
Activity 21h
Activity 21h
<html>
<!-- Activity 21h by Graham Brown -->
<head>
</head>
<body>
<h1>Winter sports</h1>
<p>This website gives you information on some aspects of
winter sports. Here
is a list of winter sports and the clothes that you need to
wear for them.</p>
<ul>
<li>Skiing</li>
<ol>
<li>Jacket</li>
<li>Salopettes</li>
<li>Hat</li>
<li>Gloves</li>
<li>Goggles</li>
<li>Ski boots</li>
</ol>
<li>Tobogganing</li>
<ol>
<li>Jacket</li>
<li>Salopettes</li>
<li>Hat</li>
<li>Gloves</li>
<li>Goggles</li>
</ol>
<li>Snowboarding</li>
<ol>
<li>Jacket</li>
<li>Salopettes</li>
<li>Hat</li>
<li>Gloves</li>
<li>Snowboard boots</li>
</ol>
</ul>
<p> Webpage by Graham Brown</p>
</body>
</html> Markup printout
Use of OL for sub-lists (1 mark per list) 3 marks
Activity 21i
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
Evidence that all 6 hyperlinks visible on page 1 mark
Page 1 of 6
Activity 21i
Markup printout
<!DOCTYPE html> YOUR NAME replaced by student’s name
1 mark
<html>
<!-- Activity 21i by Graham Brown -->
<head>
<title>Activity 21i</title>
<style>
h1 { color: #FF0000;
font-family: Arial,Helvetica,sans-serif;
font-size: 30pt;
text-align: center }
h2 { color: #800000;
font-family: Arial,Helvetica,sans-serif;
font-size: 20pt;
text-align: left }
h3 { color: #000000;
font-family: Arial,Helvetica,sans-serif;
font-size: 14pt;
text-align: justify;
margin-left: 40px;
margin-right: 40px }
p { color: #663300;
font-family: Arial,Helvetica,sans-serif;
font-size: 14pt;
text-align: justify;
margin-left: 20px;
margin-right: 20px }
Page 2 of 6
Activity 21i
Page 3 of 6
Activity 21i
Page 4 of 6
Activity 21i
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>1A</td>
<td>1B</td>
<td>1C</td>
</tr>
</table>
<p>... and so on. This counting system continues like
this...</p>
<br>
<table border="1" style="padding:2;spacing:2">
<tr>
<td>Decimal</td>
<td>152</td>
<td>153</td>
<td>154</td>
<td>155</td>
<td>156</td>
<td>157</td>
<td>158</td>
<td>159</td>
<td>160</td>
<td>161</td>
<td>162</td>
<td>163</td>
<td>164</td>
<td>165</td>
<td>166</td>
<td>167</td>
<td>168</td>
<td>170</td>
<td>171</td>
<td>172</td>
<td>173</td>
</tr>
<tr>
<td>Decimal</td>
<td>98</td>
<td>99</td>
<td>9A</td>
<td>9B</td>
<td>9C</td>
<td>9D</td>
<td>9E</td>
<td>9F</td>
<td>A0</td>
<td>A1</td>
<td>A2</td>
Page 5 of 6
Activity 21i
<td>A3</td>
<td>A4</td>
<td>A5</td>
<td>A6</td>
<td>A7</td>
<td>A8</td>
<td>A9</td>
<td>AA</td>
<td>AB</td>
<td>AC</td>
</tr>
</table>
<p>The largest number that can be stored in a single byte of
information is the decimal number 255 which is FF in
hexadecimal.</p>
<hr>
<h2><div id="links"></div> Useful hyperlinks</h2>
<p>There are other places that can be used to gain valuable
information that may help. These include the <a
href="http:\\www.hoddereducation.co.uk">Hodder Education</a> website
and the <a href="http:\\www.w3.org">W3C</a> website.</p>
<p>Back to the <a href="#top">top</a></p>
</body>
</html>
External hyperlink address correct 3 marks
1st anchor around the text ‘Hodder Education’ 1 mark
2nd anchor around the text ‘W3C’ 1 mark
Page 6 of 6
Activity 21j
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
Yellow background 1 mark
Thick outside border 1 mark
Image shows as hyperlink 1 mark
Page 1 of 3
Activity 21j
Metadata
meta tag used for all 4 1 mark
…. charset 1 mark
Correct text "ISO-8859-1" 1 mark
name = "author" 1 mark
content = authors name 1 mark
name = "keywords" 1 mark
content = all 3 text items 1 mark
… separated with commas 1 mark
name = "viewport" 1 mark
content = "width=device-width 1 mark
, initial-scale= 1 mark
2.0" 1 mark
<meta charset="ISO-8859-1">
<meta name="author" content="Graham Brown">
<meta name="keywords" content="PTC, travel, expenses">
<meta name="viewport" content="width=device-width, initial-
scale=2.0">
Base tag … 1 mark
… Target attribute … 1 mark
… ="_self" 1 mark
<base target="_self">
</head>
<body>
<h2> Activity 21j by Graham Brown </h2>
table styles defined
style attribute to embed CSS 1 mark
background-color:#FFFF00 1 mark
border-collapse:collapse; 1 mark
border for table 4px 1 mark
Page 2 of 3
Activity 21j
<th colspan="4">Expenses</th>
</tr>
<tr>
<th>Anne</th>
<th>Dan</th>
<th>Lisa</th>
<th>Udoka</th>
</tr>
</thead>
<tbody>
<tr style="text-align:right;">
<th>Petrol</th>
<td>$182.20</td>
<td>$185.75</td>
<td>$260.00</td>
<td>$322.00</td>
</tr>
<tr style="text-align:right;">
<th>Food</th>
<td>$80.00</td>
<td>$62.40</td>
<td>$54.00</td>
<td>$40.00</td>
</tr>
<tr style="text-align:right;">
<th>Hotel</th>
<td>$420.00</td>
<td>$382.10</td>
<td>$104.50</td>
<td>$260.00</td>
</tr>
</tbody>
</table>
</body>
</html>
Page 3 of 3
Activity 21k
Browser view
Visible in a web browser 1 mark
Student’s name visible on printout 1 mark
Thick outside border 1 mark
Yellow background colour to table 1 mark
Page 1 of 4
Activity 21k
<!DOCTYPE html>
<!-- Activity 21k by Graham Brown -->
<html>
<head>
<title>Activity 21k by Graham Brown</title>
<link rel="stylesheet" type="text/css" href="21kstyles.css">
</head>
<body> Head section
Stylesheet attached 1 mark
….replacing previously defined <style></style> 1 mark
Correct filename and extension 1 mark
With relative file path 1 mark
Page 2 of 4
Activity 21k
</tbody>
</table>
</body>
</html>
Page 3 of 4
Activity 21k
or
Page 4 of 4
Activity 21l
Page 1 of 2
Activity 21l
Markup printout
<html> Stylesheet correctly attached 2 marks
<head> With relative file path 1 mark
<title>Activity 21L</title>
<link rel="stylesheet" type="text/css" href="mystyle2.css">
</head>
<body>
<h1>Activity 21L</h1>
<h4>by Graham Brown</h4>
<h1>If you have attached the stylesheet correctly, this text
will have a sans-serif, 24 point, centre aligned, italic font.</h1>
<h2>If you have attached the stylesheet correctly, this text
will be a proportionally spaced, 16 point, right aligned, bold
font.</h2>
<h3>If you have attached the stylesheet correctly, this text
will be a proportionally spaced, 16 point, left aligned, underlined
font.</h3>
<p>If you have attached the stylesheet correctly, this text will
have a serif, 14 point, left aligned font.</p>
</body>
</html> Browser view printout
Shows all correct styles 4 marks
(1 mark for each correct style)
Student name in correct place & style 1 mark
Printed from browser 1 mark
Page 2 of 2
Activity 21m
Page 1 of 2
Activity 21m
Page 2 of 2
Activity 21n
Page 1 of 2
Activity 21n
Page 2 of 2
Activity 21o
Page 1 of 2
Activity 21o
Page 2 of 2
Activity 21p
Page 1 of 2
Activity 21p
Page 2 of 2
Activity 21q
HTML printout
head section 1 mark
correct link to css file 1 mark
with your own filename 1 mark
Your name as a comment 1 mark
Page 1 of 3
Activity 21q
Page 2 of 3
Activity 21q
Page 3 of 3
Activity 21r
HTML printout
Your name as a comment 1 mark
Page 1 of 3
Activity 21r
Page 2 of 3
Activity 21r
Page 3 of 3