Project: Luigi's Pizzeria - "Prices" Page
Requirements
- The other pages will have links to each other.
- Each page will have a picture of the fictional restaurant that consists of a large image.
- Each page will have a copyright at the bottom.
- The "Prices" page will have a table that shows the cost of each pizza by size.
Instructions
- In the "prices.html" file, add the following code:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Luigi's Pizzeria</title> </head> <body> </body> </html>
- Save.
- If "Live Server" is not already running, right-click anywhere in the editor and select "Open with Live Server" from the context menu.
- Create a heading for the page by adding the following code between the opening and closing tags of the body:
<h1>Luigi's Pizzeria</h1>
- Save.
- Create a navigation bar for the website by adding the following code under the heading:
<!-- Navigation Bar --> <ul> <li><a href="./index.html">Home</a></li> <li><a href="./pizzas.html">Our Pizzas</a></li> <li><a href="./prices.html">Prices</a></li> <li><a href="./contact.html">Contact</a></li> </ul>
- Save.
- Create a background image for the website by adding the following code under the navigation bar:
<img src="./images/background.jpg" alt="background image"> <br>
- Save.
- Create a subheading (h2) for the page by adding the following code under the background image:
<h2>Prices</h2> <br>
- Save.
- Create a price table for the three pizzas types by adding the following code under the "Prices" subheading:
<table> <tr> <th>Toppings</th> <th>Slice</th> <th>Small</th> <th>Medium</th> <th>Large</th> </tr> <tr> <td>Cheese</td> <td>$3.00</td> <td>$10.00</td> <td>$13.00</td> <td>$15.00</td> </tr> <tr> <td>Mushroom</td> <td>$3.50</td> <td>$12.00</td> <td>$15.00</td> <td>$17.00</td> </tr> <tr> <td>Pepperoni</td> <td>$4.00</td> <td>$15.00</td> <td>$17.00</td> <td>$19.00</td> </tr> </table>
- Save.
- Create a footer for the page by adding the following code under price table:
<p>© 2023 All rights reserved.</p>
- Save.
- Click on the "Prices" link and in the browser, you should see the following:
Code Walkthrough and Explanation
For the "Prices" page, all requirements were met. The page features links to each of the other pages, allowing easy navigation to other parts of the site. The page includes a large image of the fictional restaurant used for the "background". A copyright is present at the bottom of the page, providing necessary information about the ownership and rights of the content. The page includes a table showing the prices of the 3 types of pizzas by size.
Video and Code References
Questions? Subscribe and ask in the video comments: