Ict CH 21 HTML
Ict CH 21 HTML
Technology
WEBSITE
AUTHORING
21.1 Web development layers
21.2 Create a web page
21.3 Use stylesheets
3 21.1 Web development layers
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.
4
THE CONTENT LAYER
text and images placed
where the page structure, such as frames, tables,
hyperlinks
Structure layer
5 HTML
CSS-cascading stylesheet
7
CSS-CASCADING STYLESHEET
Styles are created and added to web pages
written (embedded) into HTML but it is usually
created in a separate file saved with a .css file
extension
Can develop at our own stylesheets using a simple
text editor
8
THE BEHAVIOUR LAYER
This layer is where all actions, such as
controlling elements (except hyperlinks), on a
web page are created
Main Contents
14
CONT’
Add comments Start <!– and end -->
<!DOCTYPE html>
<html>
<head> <title> Webpage Name </title>
</head>
<body>
</body> <!– This is Comments….. -->
</html>
15
CONT’
<p> </p> -- Paragraph
<h1> to <h6> -- 6 Heading styles Largest to
smallest
16
CONT’
Task 21a
<thead></thead>
<tfoot></tfoot>
<th></th>
<tbody></tbody>
36
37
<!DOCTYPE html> </thead>
38 <html> <tfoot> <tr>
<!-- 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>
<tr>
39 <td>Pear</td>
<td>$240</td></tr>
<tr>
<td>Banana</td>
<td>$4235</td> </tr>
<tr>
<td>Lemon</td>
<td>$75</td> </tr>
</tbody>
</table>
</body>
</html>
40 21d Browser Display
Activity 21.b. Create a new web page with a table that looks
41
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.
42 21.2.10 Use embedded CSS in HTML
Table border:
Create a single table border
❑ border-collapse:collapse;
Set table border widths
❑ border:solid 2px
50
51
52
53 Task 21g Browser Display
54
55
<br>
tag between each table to set a line break.
The <br> tag does not have a close tag.
Border spacing
64
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.
65
66 21.2.16 Insert an image
Numbered lists
blue and underlined – a link that has not yet been used
purple – a link that has been previously used
red – an active link.
92 Division tags
Where more than one web page is used, the styles only have to be
defined once and then attached to all the web pages
In-line styles, defined within the HTML, usually override styles attached
from an external stylesheet
99 This allows companies to develop different stylesheets
for specific items such as colour schemes, text styles
and styles for a particular document or set of
documents
Can define the two elements td, table data and th, table
head at the same time,
In the HTML window, add this line of text above the title
tags in the head section
105 21.3.5 Use relative file paths for
attached stylesheets
the property for the style, followed by a colon, then the property’s
value
21.3.8 Specify font properties
112
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
Background colour
127
128
Background images
applied to the body section of a web
page using the background-image
property with a value containing the
Uniform Resource Locator followed by the
image’s address or filename
129