Pure CSS Dropdown Menu

In this tutorial we will see how to create a Pure CSS Dropdown Menu. For this dropdown menu we have used only HTML and CSS, no JavaScript is used.


Take a look at the HTML code given below.

<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8">
  <title>Dropdown Menu Using HTML and CSS</title>
  <link rel="stylesheet" href="style.css"> 
     <li><a href="#">Home</a></li>
     <li><a href="#">About Us</a></li>
       <a href="#">Skills &#x25BE;</a>
       <ul class="dropdown">
        <li><a href="#">HTML</a></li>
        <li><a href="#">CSS</a></li>
        <li><a href="#">JavaScript</a></li>
     <li><a href="#">Contact Us</a></li>

CSS Code

CSS code is given below.

* {
padding: 0;
margin: 0;
background-color: #00FF8C;
ul {
list-style: none;
background: #333;
text-align: center;
ul li {
display: inline-block;
position: relative;
ul li a {
display: block;
padding: 20px 25px;
color: #FFF;
text-decoration: none;
text-align: center;
font-size: 16px;
ul li ul.dropdown li {
display: block;
background: #333;
margin: 2px 0px;
ul li ul.dropdown {
background: #00FF8C;
position: absolute;
z-index: 999;
display: none;
ul li a:hover {
background: #222;
ul li:hover ul.dropdown{
display: block;

Video Tutorial

Watch our video tutorial on Pure CSS Dropdown Menu.

Social Media Menu with Popup Tooltip using HTML and CSS Horizontal Navigation Menu with HTML and CSS Responsive Sidebar Menu with CSS and JavaScript Cool CSS Button with Hover Animation Pure CSS Custom Radio Buttons Custom Emoji Radio Buttons with CSS Color Picker Design with HTML CSS and JavaScript Custom Radio Buttons with CSS Engraved HTML Buttons With CSS Neumorphic Buttons Design with CSS Cool Profile Card Design with HTML CSS Neumorphic Search Bar Design with HTML and CSS Simple Login Form with Placeholder Animation Pure CSS Button with Folded Corner Background Color Change Slider with HTML CSS and JavaScript 404 Page Not Found Template Design with HTML and CSS Movies Blog Card Design with HTML and CSS Simple CSS Border Animation with before and after Selector Custom Social Select Dropdown Menu with CSS and JavaScript Facebook Offline and Online Notification with CSS and JS New Year 2022 Text Animation with CSS and JS Change Placeholder Color using CSS Custom Select Tag DropDown with CSS and JavaScript Simple Price Range Slider With HTML CSS and JavaScript Profile Card With Hover Effect using HTML and CSS Circle With Two Colors using CSS Simple FAQ Accordion With HTML CSS and JavaScript