body { font-family: Arial, sans-serif; margin: 0; padding: 0; }
li { margin-bottom: 10px; }
menuItems.forEach((item) => { const itemText = item.textContent.toLowerCase(); if (itemText.includes(filterValue)) { item.style.display = 'block'; } else { item.style.display = 'none'; } }); }); This JavaScript code adds a filter input field and listens for input events. When the user types a filter value, it hides or shows menu items based on whether they match the filter value. restaurant menu html css codepen
h3 { margin-top: 0; }
li { margin-bottom: 10px; }