Restaurant Menu Html Css Codepen May 2026

Let's build the skeleton. We will create a card-based layout.

Aged beef, black truffle aioli, brioche bun.

$24 Use code with caution. 3. Styling with Modern CSS

This is where the magic happens. To create a menu that looks professional, focus on layout and typography. Flexbox and Grid

Use CSS Grid for the overall layout and Flexbox for the internal alignment of items. This ensures the price stays aligned to the right while the description stays on the left. Use code with caution. Typography and Color

A "Steakhouse" menu might use bold serifs and dark tones, while a "Vegan Cafe" would lean toward light greens and clean sans-serif fonts. Use Google Fonts to import high-quality typography directly into your CodePen CSS settings. 4. Making it Interactive (No JavaScript Required!)

You can add a layer of "polish" using pure CSS transitions. For example, adding a subtle hover effect to menu items makes the interface feel more responsive. Use code with caution.

For a truly "app-like" feel, use CSS Scroll Snap so that when a user swipes through categories on their phone, the sections snap perfectly into place. 5. Top "Restaurant Menu" Trends on CodePen

If you are looking for inspiration on CodePen, look for these popular design patterns:

The Tabbed Menu: Uses hidden checkboxes or radio buttons to switch between Breakfast, Lunch, and Dinner without refreshing the page.

The Dark Mode Menu: Utilizing prefers-color-scheme to give late-night diners a sophisticated, eye-friendly experience.

Floating Images: Using CSS z-index and absolute positioning to show a preview image of the dish when the user hovers over the text. 6. Deployment and Beyond

Once your CodePen project is complete, you can "Export" the code to use on a live website or use the CodePen Prefill API to integrate it into a larger CMS.

Building a restaurant menu with HTML and CSS is the perfect way to practice responsive design. Since most customers view menus on their phones while standing outside or sitting at the table, ensuring your CodePen project looks perfect on mobile is your number one priority. restaurant menu html css codepen

Ready to start? Head over to CodePen, create a new "Pen," and start coding your culinary masterpiece!


Title: How to Create a Responsive Restaurant Menu Card: HTML/CSS CodePen Demo

Meta Description: Need a clean, responsive restaurant menu section for your site? Check out this step-by-step HTML/CSS guide with a live CodePen embed. No JS required.


Introduction

Whether you’re building a landing page for a local café or a full-stack food delivery app, the menu section is the heart of any restaurant website. It needs to be scannable, mobile-friendly, and appetizing.

In this post, I’ll walk you through a pure HTML/CSS restaurant menu card that you can edit live on CodePen. We’ll use CSS Grid + Flexbox to create a modern two-column layout that collapses beautifully on mobile.


Live Demo (CodePen)

Below is the final interactive demo. You can fork it and change the prices, dish names, or colors instantly.

(Include your embedded CodePen here – see HTML snippet below)

<p class="codepen" data-height="500" data-default-tab="result" data-slug-hash="YOUR_PEN_ID" data-user="YOUR_USERNAME" style="height: 500px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Restaurant Menu - HTML/CSS only">
  <span>See the Pen <a href="https://codepen.io/YOUR_USERNAME/pen/YOUR_PEN_ID">
  Restaurant Menu</a> by you (<a href="https://codepen.io/YOUR_USERNAME">@YOUR_USERNAME</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>

(If you don’t have a live pen yet, paste the code from the next section into CodePen and replace the IDs above.)


Complete HTML/CSS Code (Copy-paste into CodePen)

HTML (paste in HTML panel):

<header>
  <h1>Sample Bistro</h1>
  <nav aria-label="Menu categories">
    <a href="#starters">Starters</a>
    <a href="#mains">Mains</a>
    <a href="#desserts">Desserts</a>
  </nav>
</header>
<main>
  <section id="mains" aria-labelledby="mains-heading">
    <h2 id="mains-heading">Mains</h2>
    <ul class="menu-list">
      <li class="menu-item">
        <div class="item-head">
          <h3 class="item-name">Grilled Salmon</h3>
          <span class="price">$18</span>
        </div>
        <p class="item-desc">Lemon butter, seasonal vegetables.</p>
      </li>
    </ul>
  </section>
</main>

CSS (paste in CSS panel):

:root
  --bg:#fff; --text:#111; --muted:#666; --accent:#c04;
  --radius:8px;
*box-sizing:border-box
bodyfont-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; color:var(--text); background:var(--bg); margin:0; padding:1rem;
headerdisplay:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1rem;
nav amargin-right:.5rem; color:var(--accent); text-decoration:none;
.menu-listlist-style:none; padding:0; margin:0; display:grid; gap:1rem;
.menu-itembackground:#f9f9f9; padding:1rem; border-radius:var(--radius);
.item-headdisplay:flex; justify-content:space-between; align-items:center; gap:1rem;
.item-namemargin:0; font-size:1.05rem;
.pricefont-weight:700; color:var(--accent);
.item-descmargin:.5rem 0 0; color:var(--muted); font-size:.95rem;
@media(min-width:800px)
  .menu-listgrid-template-columns:repeat(2,1fr);

<div class="menu-container">
  <div class="menu-header">
    <h1>La Pergola <span>Ristorante</span></h1>
    <p>Fresh pasta • Local ingredients • Daily specials</p>
  </div>

<div class="menu-grid"> <!-- Appetizers section --> <div class="menu-section"> <h2>Antipasti</h2> <div class="menu-item"> <div class="item-info"> <span class="item-name">Burrata e Pomodori</span> <span class="item-desc">Creamy burrata, heirloom tomatoes, basil, olive oil</span> </div> <span class="item-price">$14</span> </div> <div class="menu-item"> <div class="item-info"> <span class="item-name">Calamari Fritti</span> <span class="item-desc">Lightly fried calamari, lemon aioli, spicy marinara</span> </div> <span class="item-price">$13</span> </div> </div>

<!-- Pasta section -->
<div class="menu-section">
  <h2>Pasta</h2>
  <div class="menu-item">
    <div class="item-info">
      <span class="item-name">Tagliatelle al Tartufo</span>
      <span class="item-desc">Fresh egg pasta, black truffle butter, parmesan</span>
    </div>
    <span class="item-price">$22</span>
  </div>
  <div class="menu-item">
    <div class="item-info">
      <span class="item-name">Gnocchi Sorrentina</span>
      <span class="item-desc">Potato gnocchi, tomato-basil sauce, fresh mozzarella</span>
    </div>
    <span class="item-price">$19</span>
  </div>
</div>

</div>

<div class="menu-footer"> <p>Add $6 for gluten-free pasta • Ask about today’s dessert</p> </div> </div>

  • Layout:
  • Typography:
  • Item layout:
  • Visuals:
  • Utilities:

  • Toasted bread topped with tomatoes, garlic, and basil.

    $12
    $12