Now that we have our HTML structure in place, let's add some CSS to make our menu look visually appealing. Here's an example:
<!-- index.html -->
menuItems.forEach((item) => { const itemText = item.textContent.toLowerCase(); if (itemText.includes(filterValue)) { item.style.display = 'block'; } else { item.style.display = 'none'; } }); }); You can view the complete CodePen example here . restaurant menu html css codepen
const filterInput = document.getElementById('filter-input'); Now that we have our HTML structure in
header { background-color: #333; color: #fff; padding: 1em; text-align: center; } !-- index.html -->