Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Implement a CSS-only hamburger menu that toggles on click.

Hard

Problem Statement

Implement a CSS-only hamburger menu that toggles on click.

Sample Output

Clicking the hamburger icon toggles the menu.

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

<!DOCTYPE html> <html> <head> <style> /* Add CSS here to create the CSS-only hamburger menu */ </style> </head> <body> <div class="hamburger-menu"> <input type="checkbox" id="toggle" /> <label for="toggle">&#9776; Menu</label> <div class="menu"> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </div> </div> </body> </html>

Document

To view the HTML changes, please type the code within the editor