Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST TOOLS MATH

Projects

Projects Home Personal Page Profile Card Collection JavaScript Toolkit Portfolio Recipe Page CSS Landing Page JavaScript Data Toolkit Interactive Todo List Mobile Calculator Weather Dashboard Browser Puzzle Game E-commerce Frontend Analytics Dashboard

Share

HTML Project: Menu Bar, Grid and Phones

Complete each step in the editor and watch the result as your page takes shape.

Build Menu Bar, Grid and Phones, step-by-step

Make it work like a real website.

A menu bar, a button, a live open sign, a bento grid, a map, and phones.

Easy · +110 XP · HTML CSS

What you will use in this project

  • Layout with flexbox and grid
  • Buttons
  • JavaScript in a page
  • Iframes

How it works

  1. 1 Follow the steps on the left. Each dot in the stepper bar is one focused chunk of work. Read the instructions, the “What to do” checklist, and any hints.
  2. 2 Write your code on the right. The editor is yours. Files auto-save as you type. Use the Preview tab to see your work in action.
  3. 3 Click Check code when you’re ready. We grade your work against the step’s rubric and tell you exactly what passed and what still needs work.
  4. 4 Pass a step to move on. Build the project cumulatively. Pass every step to complete it and earn the full XP.

How it’s graded

This project is broken into 9 steps. Each one has its own pass criterion. Click Check code on every step to verify your progress and earn the full +110 XP.

# Step & pass criterion Weight
1 Add a menu bar Under <body>, add <div class="navbar"> with links Menu, Specials, Find Us, Book a Table to #menu, #specials, #find, #book. Give the last class="cta". 6 pts
2 Make the menu a pill
  • Give .navbar display: flex, width: fit-content, margin: 20px auto 0, background-color: white and border-radius: 30px.
  • Give .navbar a text-decoration: none, padding: 8px 16px and border-radius: 30px. Give .navbar .cta background-color: #111111 and color: white.
12 pts
3 Add an Order button
  • In <div id="hero">, delete the <p> with the #menu link. In its place, add a <button> with the text Order now.
  • Give it an onclick that shows a message with alert(). Put the message in single quotes inside the double quotes.
12 pts
4 Style the button Give button background-color: #E8590C, color: white, border: none, border-radius: 30px and padding: 16px 34px. 6 pts
5 Show if the café is open
  • Under <p class="tagline">, add an empty <p id="open">.
  • Before </body>, add a <script>. Put new Date().getHours() in const hour. Use if (hour >= 7 && hour < 17) and else. In each, write a message with document.getElementById("open").innerHTML.
12 pts
6 Make the open label Give #open display: inline-block, background-color: #E6F4EA, padding: 4px 14px and border-radius: 20px. 6 pts
7 Add a map and a grid
  • After the </div> of the <h2 id="hours"> card, add <div class="card wide"> with <h2 id="find"> and an <iframe> with src="https://maps.google.com/maps?q=Chania&output=embed".
  • Put all cards in <div class="grid">. Make the story card class="card wide".
12 pts
8 Make a bento grid
  • In .card, delete max-width and margin.
  • Give .grid display: grid, grid-template-columns: repeat(3, 1fr), gap: 20px and padding: 0 24px. Give .wide grid-column: span 2.
  • Give iframe width: 100%, height: 220px and border: none.
18 pts
9 Make it work on phones
  • In the head, add a <meta> with name="viewport" and content="width=device-width, initial-scale=1.0".
  • In style.css, give img max-width: 100%. Add @media (max-width: 600px). In it, give .grid grid-template-columns: 1fr.
  • Also in it, set the grid-column of .wide to auto.
16 pts
index.html
Menu Bar, Grid and Phones preview
← Browse all projects


Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by W3Schools. All Rights Reserved. W3Schools is Powered by W3.CSS.