CSS Menu Design

Using CSS properties the dropdown menu can be designed.

An example of dropdown menu is shown below in which a submenu is dropped whenever mouse is moved over drop down menu.

Initially the contents of drop down needs to be hide, so display property is used as: 

display: none;

Then using hover state of element, the contents of drop down is shown as:

display: block; 

Code For Dropdown Menu:

position: relative;
border-bottom:5px double black;
background-color: coral;
color: white;
border-left:15px solid black; }
position: absolute;
display: none;
.dd:hover .ddcontents{
display: block;
list-style-type: none;
.menu li a{
display: block;
text-decoration: none;
background-color: lightgreen;
color: darkgreen;
text-align: center;
.menu li a:hover{
border:2px double blue;
border-left:15px solid blue;
background-color: lightblue;
color: darkblue;
<h1> Example of DropDown </h1><br>
<p> Move Mouse over the text below to see the dropdown effects. </p><br><br>
<div class="dd"> DropDown
<div class="ddcontents">
<ul class="menu">
<li> <a href="#"> About Us </a> </li>
<li> <a href="#"> Services </a> </li>
<li> <a href="#"> Achievements </a> </li>
<li> <a href="#"> Contact Us </a> </li>


Qus. 1 : ____tag embeds CSS in a webpage.

  1. <html>
  2. <style>
  3. <css>
  4. <xml>


CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad