Читать книгу CoderDojo: My First Website - Clyde Hatter - Страница 19
ОглавлениеA link has two main parts:
the bit inside the href attribute is the name of the page you want the link to go to. So href="about-us.html" would take you to the About Us page.
the text between the link’s opening and closing tags is the text that the reader will click on. Often this text appears underlined on the web page. In our example, the link text will be ‘About Us’
If you display the home page in a browser it should look like this:
We are the Nanonauts!
This is our website. Click on a link to visit a page:
About Us
Our Songs
See Us Play
NINJA TIP
Be careful when you’re typing links. You have to get them exactly right! They always have the same pattern:
start and end a tags href attribute filename link text
<a href="songs.html">Our Songs</a>
<a href="songs.html">Our Songs</a>
<a href="songs.html">Our Songs</a>
<a href="songs.html">Our Songs</a>
Notice how the href attribute puts quote marks around the filename and how it comes inside the a start tag.
THINGS TO DO NEXT
Make three other pages from the site map. Do it in the same way you made the Our Songs page – save an existing page with a new name and then change the content of the page. When you’ve made the page, add links to the new pages from the home page.
Some suggestions (your own ideas welcome!):
PAGE NAME
FILE NAME
Choosing Instruments Playing Songs Together Tuning Up Playing a Concert Amplification Finding Somewhere to Practice
choosing-instruments.html playing-songs-together.html tuning-up.html playing-a-concert.html amplification.html somewhere-to-practice.html
MORE ONLINE
Adding links to pages – http://nano.tips/addlinks