Читать книгу CoderDojo: My First Website - Clyde Hatter - Страница 16
Оглавление<BUILDING THE SITE>
ADDING NEW WEB PAGES
The Nanonauts now want to make a new page which lists the songs they play. The easiest way to make a new page is to copy an existing page and change it.
Open the about-us.html file. Then go to the File menu and choose the Save As option. Save the file as our-songs.html. Notice how the new file appears in the list of files in the nanonauts folder. You now have a new web page named our-songs.html. But at the moment it’s just the same as the
about-us.html page. You’ll need to edit the text so that the page is now a list of songs.
Use the example below for ideas. Add in your own favourite songs!
<!DOCTYPE html> <html> <head> <title>Our Songs</title> <link type="text/css" rel="stylesheet" href="css/my-first-stylesheet.css"/> </head> <body> <h1>Our Songs</h1> <p>This is a list of the songs we can play:</p> <ul> <li>Magical Mystery Bug</li> <li>Boot It</li> <li>The Long and Winding Code</li> <li>Dojo Dancing</li> <li>Empty Elements</li> <li>Java Chameleon</li> </ul> </body> </html>
When you’ve finished editing the page, save it and then open the file in your web browser.
NINJA TIP
Every time you save a file in the editor, reload the web page in the web browser to see the effect of your most recent changes. Think ‘Save and reload!’