Project: Menu, Photos and Hours
Instructions

Write the menu

Step 1 of 5
Write the menu as a table. <tr> is a row, <th> a header cell and <td> a normal cell.

Instructions

In index.html:

  • Before the reviews <h2>, add <h2 id="menu">Menu</h2>.
  • Under it, add a <table>: a row with two <th>, then five rows with two <td>, item and price. Include Pancake stack, Cherry croissant and Cappuccino.
Example solution
  • Find the heading of the reviews. In our code it is <h2>What Guests Say</h2>. Your text can be different. Just before that heading, write:
    <h2 id="menu">Menu</h2>
  • Under the Menu heading, write this table:
    <table>
      <tr><th>Item</th><th>Price</th></tr>
      <tr><td>Espresso</td><td>$3</td></tr>
      <tr><td>Cappuccino</td><td>$4</td></tr>
      <tr><td>Croissant</td><td>$3</td></tr>
      <tr><td>Pancake stack</td><td>$7</td></tr>
      <tr><td>Cherry croissant</td><td>$4</td></tr>
    </table>
How it works

Style the menu

Step 2 of 5
Make the menu table easy to read, with white rows and thin lines.

Instructions

In index.html:

  • In the style element, give table width: 100%, border-collapse: collapse and background-color: white.
  • Give th, td padding: 12px 16px, text-align: left and border-bottom: 1px solid #EEEEEE.
Example solution
  • In the style element, at the end (before </style>), write:
    table {width: 100%; border-collapse: collapse; background-color: white;}
    th, td {padding: 12px 16px; text-align: left; border-bottom: 1px solid #EEEEEE;}
    th {color: gray; font-weight: normal;}
How it works

Show the food

Step 3 of 5
Show three small food photos above the menu.

Instructions

In index.html:

  • Under <h2 id="menu">, before <table>, add a <p> with three <img> food photos.
  • Give each photo an alt text, and one of these addresses as src:
    https://www.w3schools.com/w3images/croissant.jpg
    https://www.w3schools.com/w3images/sandwich.jpg
    https://www.w3schools.com/w3images/popsicle.jpg
  • Give the photos the same height, like height="120".
Example solution
  • Find the Menu heading, the <h2> with id="menu". Under it, before <table>, write:
    <p>
      <img src="https://www.w3schools.com/w3images/croissant.jpg" alt="Croissant" height="120" style="border-radius:16px;">
      <img src="https://www.w3schools.com/w3images/sandwich.jpg" alt="Sandwich" height="120" style="border-radius:16px;">
      <img src="https://www.w3schools.com/w3images/popsicle.jpg" alt="Popsicle" height="120" style="border-radius:16px;">
    </p>
How it works

Add opening hours

Step 4 of 5
Add the opening hours as a description list. <dt> is a day and <dd> is its time.

Instructions

In index.html:

  • Before </body>, add an <h2> with id="hours".
  • Under it, add a <dl> with two days, each in its own <dt>. Under each day, add its times in a <dd>.
  • In the style element, give dt font-weight: bold.
Example solution
  • Go to the end of the page. Find </body>. Just before that line, write:
    <h2 id="hours">Opening Hours</h2>
    <dl>
      <dt>Monday to Friday</dt>
      <dd>7:00 to 17:00</dd>
      <dt>Saturday and Sunday</dt>
      <dd>8:00 to 15:00</dd>
    </dl>
  • In the style element, at the end, write:
    dt {font-weight: bold;}
How it works

Link it all up

Step 5 of 5
Add a link down to the menu and a link to your social media. A link to #menu jumps to the element with id="menu".

Instructions

In index.html:

  • Under the <p> with color:gray, add a paragraph with style="text-align:center;" and a link to #menu, like See the menu.
  • Under </dl>, add a social media link with an https:// address and target="_blank".
  • In the style element, give a a color. Change the <title> to the name of your café.
Example solution
  • Find the short sentence under the name: <p style="text-align:center; color:gray;">...</p>. Under it, write:
    <p style="text-align:center;"><a href="#menu">See the menu</a></p>
  • Find </dl>. Under it, write a link that opens in a new tab:
    <p>Follow us on <a href="https://www.instagram.com" target="_blank">Instagram</a></p>
  • In the style element, at the end, write:
    a {color: #E8590C; font-weight: bold;}
  • In the head, change <title>My Website</title> to:
    <title>Kai's Café</title>
How it works
Click Submit to grade your project.