{"id":9275,"date":"2024-01-14T18:01:00","date_gmt":"2024-01-14T18:01:00","guid":{"rendered":"https:\/\/codehim.com\/?p=9275"},"modified":"2024-01-22T16:02:12","modified_gmt":"2024-01-22T11:02:12","slug":"drop-down-navigation-menu-html-with-icons","status":"publish","type":"post","link":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/","title":{"rendered":"Drop Down Navigation Menu in HTML with Icons"},"content":{"rendered":"<p>Are you looking to create a stylish drop-down navigation menu in HTML with icons? This code provides a sleek and functional menu that enhances user experience. By clicking on menu items, you can expand and collapse submenus, facilitating easy navigation through your website.<\/p>\n<p>This code leverages HTML, CSS, and JavaScript to create an interactive and visually appealing <a href=\"https:\/\/codehim.com\/menu\/responsive-navigation-with-dropdown-and-search-box\/\" target=\"_blank\" rel=\"noopener\">drop-down navigation menu<\/a>, making it helpful for you to improve your website&#8217;s usability.<\/p>\n<h2>How to Create Drop-Down Navigation Menu HTML with Icons<\/h2>\n<p>1. First of all, load <a href=\"https:\/\/meyerweb.com\/eric\/tools\/css\/reset\/\" target=\"_blank\" rel=\"noopener\">Reset CSS<\/a> and <a href=\"https:\/\/fontawesome.com\/\" target=\"_blank\" rel=\"noopener\">Font Awesome<\/a> CSS by adding the following CDN links into the head tag of your HTML document.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/meyer-reset\/2.0\/reset.min.css\"&gt;\r\n&lt;link rel='stylesheet' href='https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.0.0\/css\/all.min.css'&gt;<\/pre>\n<p>2. Now, let&#8217;s set up the basic HTML structure for the navigation menu. Copy and paste the following code into your HTML file:<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;ul class=\"fmenu\" id=\"mymenu\"&gt;\r\n  &lt;li class=\"fmenu-item\"&gt;\r\n      &lt;div class=\"trigger-menu expanded\"&gt;\r\n          &lt;i class=\"fa-regular fa-circle-user\"&gt;&lt;\/i&gt;\r\n          &lt;span class=\"text\"&gt;Hello, Lionel&lt;\/span&gt;\r\n      &lt;\/div&gt;\r\n      &lt;ul class=\"floating-menu\"&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-regular fa-address-card\"&gt;&lt;\/i&gt;Profile&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-regular fa-comment-dots\"&gt;&lt;\/i&gt;Contact support&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-regular fa-money-bill-1\"&gt;&lt;\/i&gt;Transactions&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-right-from-bracket\"&gt;&lt;\/i&gt;Logout&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;\/ul&gt;\r\n  &lt;\/li&gt;\r\n  &lt;li class=\"fmenu-item\"&gt;\r\n      &lt;div class=\"trigger-menu\"&gt;\r\n          &lt;i class=\"fa-solid fa-gear\"&gt;&lt;\/i&gt;\r\n          &lt;span class=\"text\"&gt;Settings&lt;\/span&gt;\r\n      &lt;\/div&gt;\r\n      &lt;ul class=\"floating-menu\"&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-palette\"&gt;&lt;\/i&gt;Customize theme&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-language\"&gt;&lt;\/i&gt;Language &amp; Timezone&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-clock-rotate-left\"&gt;&lt;\/i&gt;Restore defaults&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-regular fa-file-lines\"&gt;&lt;\/i&gt;Inspect logs&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-regular fa-floppy-disk\"&gt;&lt;\/i&gt;Backup your profile&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;\/ul&gt;\r\n  &lt;\/li&gt;\r\n  &lt;li class=\"fmenu-item\"&gt;\r\n      &lt;div class=\"trigger-menu\"&gt;\r\n          &lt;i class=\"fa-regular fa-message\"&gt;&lt;\/i&gt;\r\n          &lt;span class=\"text\"&gt;Messages&lt;\/span&gt;\r\n      &lt;\/div&gt;\r\n      &lt;ul class=\"floating-menu\"&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-inbox\"&gt;&lt;\/i&gt;Inbox&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-thumbtack\"&gt;&lt;\/i&gt;Pinned&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-shapes\"&gt;&lt;\/i&gt;Templates&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;\/ul&gt;\r\n  &lt;\/li&gt;\r\n  &lt;li class=\"fmenu-item\"&gt;\r\n      &lt;div class=\"trigger-menu\"&gt;\r\n          &lt;i class=\"fa-regular fa-circle-right\"&gt;&lt;\/i&gt;\r\n          &lt;span class=\"text\"&gt;Navigate&lt;\/span&gt;\r\n      &lt;\/div&gt;\r\n      &lt;ul class=\"floating-menu\"&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-link\"&gt;&lt;\/i&gt;Page link 1&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-link\"&gt;&lt;\/i&gt;Page link 2&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-link\"&gt;&lt;\/i&gt;Page link 3&lt;\/a&gt;&lt;\/li&gt;\r\n          &lt;li&gt;&lt;a href='#'&gt;&lt;i class=\"fa-solid fa-link\"&gt;&lt;\/i&gt;Page link 4&lt;\/a&gt;&lt;\/li&gt;\r\n      &lt;\/ul&gt;\r\n  &lt;\/li&gt;\r\n&lt;\/ul&gt;<\/pre>\n<p>3. Style the navigation menu using the following CSS code. You can include it in your HTML file or link to an external CSS file.<\/p>\n<pre class=\"prettyprint linenums lang-css\">@import url(\"https:\/\/fonts.googleapis.com\/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&amp;display=swap\");\r\nhtml, body {\r\n  width: 100%;\r\n  height: 100%;\r\n}\r\n\r\nbody {\r\n  font-family: Montserrat, \"sans-serif\" !important;\r\n  background: #434343;\r\n  background: linear-gradient(135deg, #434343 0%, black 100%);\r\n  padding: 3rem;\r\n}\r\n\r\n\/*********************************************\r\nFloating Menu:\r\n**********************************************\/\r\nul.fmenu {\r\n  color: #fff;\r\n  display: inline-block;\r\n  list-style: none;\r\n  padding: 0;\r\n  margin: 0;\r\n  white-space: nowrap;\r\n}\r\nul.fmenu &gt; li.fmenu-item {\r\n  display: inline-block;\r\n  margin-right: 1rem;\r\n  position: relative;\r\n}\r\nul.fmenu .trigger-menu {\r\n  display: flex;\r\n  align-content: center;\r\n  align-items: center;\r\n  box-sizing: border-box;\r\n  min-width: 3rem;\r\n  max-width: 3rem;\r\n  height: 3rem;\r\n  border: 0.45rem solid transparent;\r\n  border-radius: 3rem;\r\n  overflow: hidden;\r\n  text-align: center;\r\n  background-color: #505050;\r\n  cursor: pointer;\r\n  transition: max-width ease 0.4s;\r\n}\r\nul.fmenu .trigger-menu i {\r\n  display: block;\r\n  margin: 0 0.2925rem;\r\n  color: white;\r\n  font-size: 1.5rem;\r\n  transition: color ease 0.3s;\r\n}\r\nul.fmenu .trigger-menu span {\r\n  display: block;\r\n  font-size: 1rem;\r\n  padding: 0 1ch;\r\n}\r\nul.fmenu .trigger-menu.expanded {\r\n  max-width: unset !important;\r\n}\r\nul.fmenu .trigger-menu.open i {\r\n  color: #ffd53e;\r\n}\r\nul.fmenu .trigger-menu:hover:not(.expanded) i {\r\n  color: #ffd53e;\r\n}\r\nul.fmenu .floating-menu {\r\n  display: block;\r\n  position: absolute;\r\n  top: 3.75rem;\r\n  min-width: 100%;\r\n  max-width: 250px;\r\n  list-style: none;\r\n  padding: 0;\r\n  margin: 0;\r\n  background-color: #505050;\r\n  border-radius: 0.75rem;\r\n  overflow: hidden;\r\n  max-height: 0px;\r\n  z-index: 100;\r\n  opacity: 0;\r\n  transition: max-height ease 0.6s, opacity ease 0.3s;\r\n}\r\nul.fmenu .floating-menu &gt; li {\r\n  padding: 0 0.5rem;\r\n}\r\nul.fmenu .floating-menu &gt; li a {\r\n  color: #fff;\r\n  font-size: 0.85rem;\r\n  text-decoration: none;\r\n  display: block;\r\n  padding: 0.75rem 0.5rem;\r\n}\r\nul.fmenu .floating-menu &gt; li a i {\r\n  margin-right: 1ch;\r\n}\r\nul.fmenu .floating-menu &gt; li a:hover {\r\n  color: #ffd53e;\r\n}\r\nul.fmenu .floating-menu &gt; li:not(:last-child) a {\r\n  border-bottom: 1px solid rgba(0, 0, 0, 0.15);\r\n}<\/pre>\n<p>4. The magic behind the interactive menu is JavaScript. This code creates a <code>sikFloatingMenu<\/code> class that handles the menu&#8217;s functionality. You can add this JavaScript code to your HTML file or link it from an external file.<\/p>\n<pre class=\"prettyprint linenums lang-js\">\/\/The menu js class:\r\nclass sikFloatingMenu {\r\n    menuEl = null;\r\n    constructor(_menu) {\r\n        \/\/The menu element:\r\n        this.menuEl = typeof _menu === 'string'\r\n                      ? document.querySelector(_menu)\r\n                      : _menu;\r\n        \/\/Attach handlers:\r\n        this.attachHandlers();\r\n    }\r\n    attachHandlers() {\r\n        if (this.menuEl) {\r\n            this._on(this.menuEl, 'click', '.trigger-menu', this._handler.bind(this));\r\n        }\r\n    }\r\n    _open(item) {\r\n        let opened = item.closest('.fmenu').querySelectorAll('.trigger-menu.open');\r\n        for (const ele of opened) {\r\n            this._close(ele);\r\n        }\r\n        item.classList.add('open');\r\n        \/\/expand:\r\n        let list = item.closest('li').querySelector(\".floating-menu\");\r\n        list.style.setProperty(\"max-height\", this._measureExpandableList(list));\r\n        list.style.setProperty(\"opacity\", \"1\");\r\n        item.style.setProperty(\"max-width\", this._measureExpandableTrigger(item));\r\n    }\r\n    _close(item) {\r\n        let list = item.closest('li').querySelector(\".floating-menu\");\r\n        item.classList.remove('open');\r\n        \/\/shrink:\r\n        list.style.removeProperty(\"max-height\");\r\n        list.style.removeProperty(\"opacity\");\r\n        item.style.removeProperty(\"max-width\");\r\n    }\r\n    _measureExpandableList(list) {\r\n        const items = list.querySelectorAll('li');\r\n        return (items.length * this._getHeight(items[0], \"outer\") + 10) + 'px';\r\n    }\r\n    _measureExpandableTrigger(item) {\r\n        const textEle = item.querySelector('.text');\r\n        const sizeBase = this._getWidth(item, \"outer\");\r\n        const sizeExpandLabel = this._getWidth(textEle, \"outer\");\r\n        return (sizeBase + sizeExpandLabel + 6) + 'px';\r\n    }\r\n    _handler(el, ev) {\r\n        if (el.classList.contains('open')) {\r\n            this._close(el);\r\n        } else {\r\n            this._open(el);\r\n        }\r\n    }\r\n    _on(ele, type, selector, handler) {\r\n        ele.addEventListener(type, function(ev) {\r\n            let el = ev.target.closest(selector);\r\n            if (el) handler.call(this, el, ev); \/\/The element is bind to this\r\n        });\r\n    }\r\n    _getWidth(el, type) {\r\n        if (type === 'inner') \r\n            return el.clientWidth;\r\n        else if (type === 'outer') \r\n            return el.offsetWidth;\r\n        return 0;\r\n    }\r\n    _getHeight(el, type) {\r\n        if (type === 'inner')\r\n            return el.clientHeight;\r\n        else if (type === 'outer')\r\n            return el.offsetHeight;\r\n        return 0;\r\n    }\r\n}\r\n\r\n\/\/Intialize menu: \r\nwindow.sik_menu = new sikFloatingMenu(\"#mymenu\");<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully created a dropdown navigation menu on your website. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking to create a stylish drop-down navigation menu in HTML with icons? This code provides a sleek and&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9294,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[38],"tags":[9],"class_list":["post-9275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-menu","tag-dropdown-menu"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Drop Down Navigation Menu in HTML with Icons &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a Drop Down Navigation Menu in HTML with Icons. You can view demo and download the source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Drop Down Navigation Menu in HTML with Icons &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a Drop Down Navigation Menu in HTML with Icons. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-14T18:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T11:02:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Drop Down Navigation Menu in HTML with Icons\",\"datePublished\":\"2024-01-14T18:01:00+00:00\",\"dateModified\":\"2024-01-22T11:02:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\"},\"wordCount\":222,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png\",\"keywords\":[\"Dropdown Menu\"],\"articleSection\":[\"Menu &amp; Nav\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\",\"url\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\",\"name\":\"Drop Down Navigation Menu in HTML with Icons &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png\",\"datePublished\":\"2024-01-14T18:01:00+00:00\",\"dateModified\":\"2024-01-22T11:02:12+00:00\",\"description\":\"Here is a free code snippet to create a Drop Down Navigation Menu in HTML with Icons. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png\",\"width\":1280,\"height\":960,\"caption\":\"Drop Down Navigation Menu in HTML with Icons\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Menu &amp; Nav\",\"item\":\"https:\/\/codehim.com\/category\/menu\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Drop Down Navigation Menu in HTML with Icons\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Drop Down Navigation Menu in HTML with Icons &#8212; CodeHim","description":"Here is a free code snippet to create a Drop Down Navigation Menu in HTML with Icons. You can view demo and download the source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/","og_locale":"en_US","og_type":"article","og_title":"Drop Down Navigation Menu in HTML with Icons &#8212; CodeHim","og_description":"Here is a free code snippet to create a Drop Down Navigation Menu in HTML with Icons. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-14T18:01:00+00:00","article_modified_time":"2024-01-22T11:02:12+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Drop Down Navigation Menu in HTML with Icons","datePublished":"2024-01-14T18:01:00+00:00","dateModified":"2024-01-22T11:02:12+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/"},"wordCount":222,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png","keywords":["Dropdown Menu"],"articleSection":["Menu &amp; Nav"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/","url":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/","name":"Drop Down Navigation Menu in HTML with Icons &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png","datePublished":"2024-01-14T18:01:00+00:00","dateModified":"2024-01-22T11:02:12+00:00","description":"Here is a free code snippet to create a Drop Down Navigation Menu in HTML with Icons. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Drop-Down-Navigation-Menu-in-HTML-with-Icons.png","width":1280,"height":960,"caption":"Drop Down Navigation Menu in HTML with Icons"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/menu\/drop-down-navigation-menu-html-with-icons\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Menu &amp; Nav","item":"https:\/\/codehim.com\/category\/menu\/"},{"@type":"ListItem","position":3,"name":"Drop Down Navigation Menu in HTML with Icons"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":2230,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=9275"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9275\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/9294"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=9275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=9275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=9275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}