AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Communication Technology

Links, visual editors and the header page

Week 9 · Unit 3 Creating Site Pages (2), Topic 1 (continued): linking pages, typing code or using a visual page editor, the header page with banner and menu · 3 lessons
1

Links between pages

ICT Secondary 2 Term 1, Unit 3, Topic 1: pp. 69–77
GoalWrite a hyperlink with the a tag and link two pages in both directions.
New words
hyperlink · text or a picture that opens another page or file when clickedanchor tag · the a tag, which makes a linkhref · the attribute that says which file or address the link opensround trip · two pages that link to each other, so a visitor can go and come back
Explanation

A hyperlink is what turns separate pages into a site. It is written with the a tag: <a href="page2.html">Go to page two</a>. The href attribute says what the link opens: a file name in the same folder, a path such as pic/router.webp, a program, or a full web address. The text between the opening and the closing tag is what the visitor clicks; it may also be a picture. A link to a file works only if the file exists with exactly that name, so check the spelling. For a visitor to move around freely, links must work in both directions: page one links to page two, and page two links back to page one. Later in this term the header page will give every page the same menu. In our lessons every link points to a page that the lesson names; we do not invent real web addresses.

Html
1<p>Next: <a href="page2.html">Go to page two</a></p>
Output
The page shows the line Next: followed by the clickable words Go to page two. A click opens the file page2.html.
Worked examples
PageLink texthrefOpens
page1.htmlGo to page twopage2.htmlpage2.html
page2.htmlBack to page onepage1.htmlpage1.html
Hana makes two pages, page1.html and page2.html. Each has a link to the other. A visitor can go from one to the other and come back.
Html
1<a href="help.php"><img src="images/help.webp" alt="Help page"></a>
Output
The page shows the small help picture. A click on the picture opens help.php.
A picture can be a link too. Here the picture help.webp opens help.php. Because the picture is the link, its alt text should say where the link goes.
Class activity

On paper design three pages for a small reading-club site (home, books, contact). Write the one line of HTML for each link needed so that every page links to the other two. Check that each link names a file you listed.

Practice
1
Which tag makes a link, and which attribute holds its target?
2
What does the visitor click in <a href="b.html">Next</a>?
3
Why should two pages link to each other?
4
A link points to Add_Term.php but the file is add_term.php. What can go wrong?