Hyperlinks are found in nearly all web pages. Links allow users to click their way from page to page, or from website to website.
Use the Trinket given below and change the link from http://www.bbc.co.uk to http://www.google.com, so that when a user clicks the link, it takes them to the Google website.
Test out your linking skills below.
This time, because all the pages we are linking to are made by us, you do not need to include the http:// part. You can just use the page name. You will notice that there is more than one html file in this example.
An estate agent has made an advert for a house and would like people to be able to have a 'virtual tour'. She has only managed to make the link to the kitchen work so far. To fix this you will need to:
Extension Task: Add another room in the house. You will have to experiment with using the '+' button for this and adding a brand new html document.
This time, you need to add another three items to the navigation menu, so that all of the links work.
When you have finished your navigation menu, you will need to copy and paste it on to every page.
You might notice there is another file added here called style.css. Leave this alone for now, it is what makes the page look nicer! We will be looking at this in more detail later.
Extension:
You are now going to create a new mini-website using Notepad. The website is only going to be three pages.
1. Create a new folder in Your Documents called 'Countries Website'
2. Create three basic webpages in that folder, as you did in Lesson 1. Use the code below for each of the pages. You will just need to change the page title for now:
<!DOCTYPE html><html><head><title>Page Title</title></head><body><h1>This is a Heading</h1><p>This is a paragraph.</p></body></html> 3. index.html is your home page, so create two links from there to Spain and France, using the skills you have just practiced.
4. Test your website (open index.html in Google Chrome).
Extension:
You have probably noticed that you cannot get back from Spain or France page.... Fix it by adding hyperlinks on these pages!
Now that you have created the pages, you are to make a mini-site with some information about the countries. You must include the following on each:
You might also want to make your homepage look nicer too! You could change the font color and sizes.