How to Create a Hamburger Menu with HTML, CSS & jQuery | HTML Goodies

How to Create a Hamburger Menu with HTML, CSS & jQuery

Written By
Diogo Souza
Diogo Souza
Nov 20, 2017
3 minute read

In this article, we will explain how to develop a burger-type menu that consists of a fixed button on the navigation bar that, when clicked, displays or hides the side menu containing a list of links, as we can see below:


Figure 1. Desktop browser view.

This menu is also responsive, so that on screens with width less than 360px it occupies the entire page, as follows:


Figure 2. Mobile browser view.

The Code

In the header of the page we refer to our stylesheet (style.css) and both stylesheet and Google file containing the fonts of Material Icons type. This fonts file is required for us to have the burger icon on the menu. This reference was made with the tag as follows:

<link rel="stylesheet" type="text/css" href="css/style.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

In the body of the document, the main part is inside the

and
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.