Ict 21
Ict 21
Communication
Technology
WEBSITE
AUTHORING
21.1 Web development layers
21.2 Create a web page
21.3 Use stylesheets
21.1 Web development layers 3
A website is a collection of individual but related web pages that are stored
together and hosted by a web server.
Web pages can include different objects such as text, sound, video and still
images.
Using three layers.
Each has a different purpose:
o the content layer
o the presentation layer
o the behaviour layer.
THE CONTENT LAYER 4
Web pages can include different objects such as text, sound, video
and still images.
Structure layer
What is HTML? 5
Files are written in text format and are usually saved with an .htm
(or .html) file extension
THE PRESENTATION LAYER 6
JavaScript
CREATE A WEB PAGE 9
The angle brackets tell the browser that this is a markup tag and not
text to be placed on the web page
Most HTML commands have two tags: one to open the command
and one to close it
The tag </html> tells the browser that this is the end of this markup
language
Objects between these tags are not usually displayed by the web
browser
objects between these tags are usually displayed in the web page.
Main Contents
CONT’
14
<!DOCTYPE html>
<html>
<head> <title> Webpage Title Name </title>
</head>
<body>
</body> <!– This is Comments….. -->
</html>
CONT’
15
➢ <p> Legacy Gaming Computers </p> -- Paragraph
➢ <h1> to <h6> -- 6 Heading styles Largest to smallest
➢ <h1> </h1>
➢ <h2> Legacy Gaming Computers </h2>
➢ <h3> </h3>
➢ <h4> </h4>
➢ <h5> </h5>
➢ <h6> </h6>
CONT’
16
Task 21a
Create and save a new web page showing paragraph and heading styles.
CONT’
<!DOCTYPE html> 17
<html>
<!-- Markup created on 06/01/2022 -->
<head>
<title>Task 21a</title>
</head>
<body>
<p>My first web page by MY NAME HERE</p>
<h1>This is style h1, the largest heading style</h1>
<h2>This is style h2</h2>
<h3>This is style h3</h3>
<h4>This is style h4</h4>
<h5>This is style h5</h5>
<h6>This is style h6, the smallest heading style</h6>
<p>This is style p, the paragraph style</p>
</body>
</html>
Browser Output Display 18
CONT’ 19
<body>
<body>
<body>
<table> <caption> Colours </caption>
<tr> <td></td><td></td>
</tr>
<tr><td></td><td></td>
</tr>
</table>
</body>
Table borders 28
<body>
<table> <caption> Colours </caption>
<tr> <td></td>
<td></td>
</tr>
<tr> <td></td>
<td></td>
</tr>
</table>
</body>
Task 21c Browser Display 32
33
Task21d Browser Display 34
Table Heading & Footing 35
<thead></thead>
<tfoot></tfoot>
<th></th>
<tbody></tbody>
36
37
<!DOCTYPE html> </thead>
<html> <tfoot> <tr> 38
<!-- Task 21d by Graham Brown --> <td>Total</td>
<head> <td>$6560</td>
<title>Task 21d</title> </tr>
</head> </tfoot>
<body> <tbody>
<table border="1"> <tr>
<caption>Fruit sales</caption> <td>Apple</td>
<thead> <td>$1230</td></tr>
<tr> <tr>
<th>Fruit</th> <td>Orange</td>
<th>Price</th></tr> <td>$780</td></tr>
39
<tr> </tbody>
<td>Pear</td> </table>
<td>$240</td></tr> </body>
<tr> </html>
<td>Banana</td>
<td>$4235</td> </tr>
<tr>
<td>Lemon</td>
<td>$75</td> </tr>
21d Browser Display 40
41
Activity 21.b. Create a new web page with a table that looks like this
and has the caption ‘Hours of sunshine last week’. Make sure the top
row of the table is in the header section and the bottom row is in the
footer section. Print your web page as HTML and as it is viewed in
your browser.
21.2.10 Use embedded CSS in HTML 42
Resize a table
❑ This attribute is an embedded CSS style attribute.
❑ In the table tag add a second attribute named style with the embedded
CSS property value
Table border:
Create a single table border
❑ border-collapse:collapse;
Set table border widths
❑ border:solid 2px
51
52
53
Task 21g Browser Display 54
55
56
Vertically align table cell contents
Data held in table cells can be vertically aligned with embedded CSS
so that it fits in the top, middle or bottom of the cell.
vertical-align: top;
vertical-align: middle;
vertical-align: bottom;
21.2.14 Adjust cells to span more than one table column 57
To create a single cell that spans across all three columns in the top row of
the table.
colspan =“2”
58
59
<tr style=“height:60px; text-align: center;”>
<td colspan=“3” style=“border:solid 3px”> Vertical </d></tr>
<tr style=“height:60px; text-align: center;”>
<td style=“vertical-align: top;”> Top </d> <td style=“vertical-
align: middle;”> Middle </d>
<td style=“vertical-align: middle;”> Bottom </d> </tr>
60
61
21.2.15 Adjust cells to span more than one table row
rowspan=“3”
Cell padding 62
the space between the cell contents and the border of the cell
It can be applied to both the table tag <table> and/or to each item of
table cell
<br>
tag between each table to set a line break.
The <br> tag does not have a close tag.
66
Border spacing 67
The spacing between the borders (border spacing) of individual cells is set in the
<table> tag.
The style attribute is used with the border-spacing property.
Two values can be passed to this property: the horizontal spacing first, then the
vertical spacing
If the horizontal and vertical border spacing are the same, you can use a single
value.
68
21.2.16 Insert an image 69
</video>
Numbered lists
<meta> </meta>
Name attribute
<base target=“_blank”>
112
21.3 Use stylesheets 113
Styles are not only set for text, but can also be used to
define page layout, colour schemes and default settings for
other objects and links on the page.
Cont’ 114
Can define the two elements td, table data and th, table
head at the same time,
to a web page
In the HTML window, add this line of text above the title
tags in the head section
21.3.5 Use relative file paths for 124
attached stylesheets
The link (with the relative file path) is attached to the
web page so when the page is opened or refreshed,
stylesheet
/* and */ are required for each comment
/* comment for one line
129
21.3.7 CSS text 130
Stylesheets do not have tags ithem as they are not a markup
language.
the property for the style, followed by a colon, then the property’s
value
21.3.8 Specify font properties 131
Font families
The generic font family must always be listed after the other
preferred font/s. The font-family property must contain a hyphen
A serif font is one that has small lines or strokes (called serifs) at the
ends of characters
properties
Background colour
146
Background images 147
font-size: 30 point;}
font-size: 18 point;}
td {padding: 10px;}