{"id":1365,"date":"2017-10-23T13:07:10","date_gmt":"2017-10-23T13:07:10","guid":{"rendered":"https:\/\/gosqeng.test\/?p=1365"},"modified":"2019-11-28T11:13:02","modified_gmt":"2019-11-28T11:13:02","slug":"semantic-responsive-website-navigation","status":"publish","type":"post","link":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation","title":{"rendered":"How to build semantic, responsive website navigation without JavaScript"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/static.gosquared.com\/images\/liquidicity\/17_10_23_nav_01@2x.png\" alt=\"Building beautiful website navigation\"\/><\/p>\n<p>We recently rolled out an update to the main navigation on the <a href=\"https:\/\/www.gosquared.com\" rel=\"noopener noreferrer\" target=\"_blank\">GoSquared<\/a> site. If you\u2019ve been to gosquared.com lately, you may have already noticed the update \u2013 it looks like this:<\/p>\n<p><video autoplay loop muted playsinline style=\"max-width:100%\"><source src=\"https:\/\/static.gosquared.com\/images\/engineering\/17_10_17_navigation\/desktop.mp4\" type=\"video\/mp4\" \/>Your browser doesn&#8217;t support this video \ud83d\ude41<\/video><\/p>\n<p>Or this, if you\u2019re on a mobile device:<\/p>\n<p><video autoplay loop muted playsinline style=\"max-height: 500px; display: block; margin: 0 auto\"><source src=\"https:\/\/static.gosquared.com\/images\/engineering\/17_10_17_navigation\/iphone_x.mp4\" type=\"video\/mp4\" \/>Your browser doesn&#8217;t support this video \ud83d\ude41<\/video><\/p>\n<p>Here\u2019s a little information on how we built it, without using a single line of JavaScript.<\/p>\n<h2>Building semantic navigation<\/h2>\n<p>We knew from the outset of this update that we wanted to build a dropdown-style navigation for desktop browsers, and fullscreen accordion-style navigation for smaller screens.<\/p>\n<p>Besides that, we also had some other requirements:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.gosquared.com\/blog\/simplicity\" title=\"Simplicity\">It should be simple<\/a> for us to maintain if we want to add or modify items.<\/li>\n<li>It should work in as many browsers as possible without any ugly hacks.<\/li>\n<li>It should play nicely if JavaScript is disabled.<\/li>\n<li><a href=\"https:\/\/www.gosquared.com\/blog\/gosquared-static-website\" title=\"Making the GoSquared marketing site fast\">It should be lightweight<\/a> &#8211; that is, if it\u2019s included on every page of the GoSquared site, it shouldn\u2019t require any weighty library code either slowing down the page or leading to weird broken states while code loads.<\/li>\n<\/ol>\n<p>This led us to set a few implementation goals to direct how we built it:<\/p>\n<ul>\n<li>Make the markup as semantic as possible (i.e. use the well-defined HTML elements in a logical way, no putting bits and pieces of markup in illogical places just to make dropdowns work)<\/li>\n<li>Reuse the same elements for both mobile and desktop (i.e. no duplicating of code)<\/li>\n<li>If possible, build the whole thing <em>without any JavaScript<\/em><\/li>\n<\/ul>\n<p>These three goals in combination would hopefully mean that we get the benefits of performance, graceful degradation, accessibility and maintainability pretty much for free.<\/p>\n<h2>The code behind the navigation \u2013 start with a list<\/h2>\n<p>At its core, the GoSquared site navigation is, just like any on any other site, a collection of links. It starts out life as an unordered list inside a <code>&lt;nav&gt;<\/code>, with each list item containing an anchor tag.<\/p>\n<pre class=\"language-markup\"><code>&lt;nav&gt;\n  &lt;ul&gt;\n    &lt;li&gt;\n      &lt;a href=\"\/one\"&gt;Item 1&lt;\/a&gt;\n    &lt;\/li&gt;\n    &lt;li&gt;\n      &lt;a href=\"\/two\"&gt;Item 2&lt;\/a&gt;\n    &lt;\/li&gt;\n  &lt;\/ul&gt;\n&lt;\/nav&gt;<\/code><\/pre>\n<p>We can put some styles on this to align the items horizontally, and give them some whitespace and hover states. That looks something like this:<\/p>\n<p data-height=\"250\" data-theme-id=\"0\" data-slug-hash=\"Lzgaym\" data-default-tab=\"result\" data-user=\"_jt\" data-embed-version=\"2\" data-pen-title=\"Super simple nav\" class=\"codepen\">See the Pen <a href=\"https:\/\/codepen.io\/_jt\/pen\/Lzgaym\/\">Super simple nav<\/a> by JT (<a href=\"https:\/\/codepen.io\/_jt\">@_jt<\/a>) on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<h2>Introducing sub-navigation<\/h2>\n<p>Now that\u2019s all well and good if your navigation has only two or three links that you want to include, but we have a whole hierarchy that we want to make accessible: under each item in the main navigation, we have one or two lists of places we want to link to.<\/p>\n<p>We start out by putting each of these sub-navigations inside the corresponding item in the root list. This starts out with another <code>&lt;nav&gt;<\/code>; since we have a couple of different sections to include, each gets its own <code>&lt;section&gt;<\/code> with a <code>&lt;header&gt;<\/code>, and then the familiar <code>&lt;ul&gt;<\/code> with a list of anchor tags.<\/p>\n<pre class=\"language-markup\"><code>&lt;nav&gt;\n  &lt;ul&gt;\n    &lt;li&gt;\n      &lt;a&gt;Item 1&lt;\/a&gt;\n\n      &lt;nav class=\"subnav\"&gt;\n        &lt;section&gt;\n          &lt;header&gt;Subnav list title&lt;\/header&gt;\n          &lt;ul&gt;\n            &lt;li&gt;\n              &lt;a&gt;\n                &lt;h5&gt;Subitem 1.1&lt;\/h5&gt;\n                &lt;p&gt;A short description&lt;\/p&gt;\n              &lt;\/a&gt;\n            &lt;\/li&gt;\n            &lt;li&gt;\n              ...\n            &lt;\/li&gt;\n          &lt;\/ul&gt;\n        &lt;\/section&gt;\n        &lt;section&gt;\n          &lt;header&gt;A second subnav column&lt;\/header&gt;\n          &lt;ul&gt;\n            ...\n          &lt;\/ul&gt;\n        &lt;\/section&gt;\n      &lt;\/nav&gt;\n    &lt;\/li&gt;\n    &lt;li&gt;\n      &lt;a&gt;Item 2&lt;\/a&gt;\n\n      &lt;nav class=\"subnav\"&gt;\n        ...\n      &lt;\/nav&gt;\n    &lt;\/li&gt;\n  &lt;\/ul&gt;\n&lt;\/nav&gt;<\/code><\/pre>\n<p>We can then position these subnavs absolutely to show as dropdowns, then use CSS <code>:hover<\/code>, <code>:focus<\/code> and <code>:focus-within<\/code> pseudo-selectors to show them when the visitor hovers or focuses the parent list item.<\/p>\n<p>By putting the sub-navigation directly inside the parent elements (as opposed to in a separate <code>&lt;div&gt;<\/code> that gets shown by some JavaScript, for example), we can handle this showing and hiding purely in CSS &#8211; since it\u2019s a child of the main list item, it will still match the <code>:hover<\/code> pseudoselector on the parent when the visitor moves their mouse away from the root list and starts interacting with the dropdown.<\/p>\n<p>Throw in some CSS transitions on <code>transform<\/code>, <code>opacity<\/code> and <code>visibility<\/code> (we don\u2019t want the dropdowns intercepting the visitor\u2019s mouse when they\u2019re not visible) and the result looks something like this:<\/p>\n<p data-height=\"450\" data-theme-id=\"0\" data-slug-hash=\"ZXqPve\" data-default-tab=\"result\" data-user=\"_jt\" data-embed-version=\"2\" data-pen-title=\"Navigation with dropdowns\" class=\"codepen\">See the Pen <a href=\"https:\/\/codepen.io\/_jt\/pen\/ZXqPve\/\">Navigation with dropdowns<\/a> by JT (<a href=\"https:\/\/codepen.io\/_jt\">@_jt<\/a>) on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<h2>Making our responsive navigation work on mobile devices<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/static.gosquared.com\/images\/engineering\/17_10_17_navigation\/time-to-go-mobile.gif\" alt=\"Time to go mobile\" \/><\/p>\n<p>So far we\u2019ve focused on the desktop experience for this navigation. But nowadays the mobile version of your experience is just as important, if not more so. <\/p>\n<p>Not only do mobile devices come with smaller screens, but they also have a different set of interactions &#8211; there\u2019s no such thing as a \u201chover\u201d state on a touch display without a mouse, for example.<\/p>\n<p>By and large browsers normalise these differences fairly well, so they are at least usable (for example, triggering a hover state after one tap, and the actual \u201cclick\u201d only on the second tap), but this often feels like a \u201cfix\u201d retrofitted to an experience solely to prevent it from being broken. So we decided to do away with the hover-based approach and create a better-designed experience for mobile devices.<\/p>\n<p>The mobile design calls for toggling the sub-navs between visible and hidden based on clicking or tapping the header of the corresponding section. This can also be achieved using CSS by incorporating a hidden checkbox and using the <code>:checked<\/code> and <code>~<\/code> (sibling) rules.<\/p>\n<p>The changed markup looks something like this:<\/p>\n<pre class=\"language-markup\"><code>&lt;li&gt;\n  &lt;input type=\"checkbox\" id=\"toggle\"&gt;\n  &lt;label for=\"toggle\"&gt;\n    &lt;a&gt;Item&lt;\/a&gt;\n  &lt;\/label&gt;\n  &lt;nav class=\"subnav\"&gt;\n    ...\n  &lt;\/nav&gt;\n&lt;\/li&gt;<\/code><\/pre>\n<p>\u2026 and the only change to the CSS to make this work is to add a rule that shows the subnav under <code>:checked ~ .subnav<\/code>.<\/p>\n<p>For the whole of the rest of the mobile navigation we can reuse all of the existing markup we already have, simply overriding and resetting any rules we previously had to show subnavs as dropdowns.<\/p>\n<p>The end result is something like this (you\u2019ll need to view on CodePen and resize your browser to see the difference between desktop and mobile versions)<\/p>\n<div style=\"max-width: 400px; text-align: center\">\n<p data-height=\"500\" data-theme-id=\"0\" data-slug-hash=\"YrJMKo\" data-default-tab=\"result\" data-user=\"_jt\" data-embed-version=\"2\" data-pen-title=\"Responsive navigation with dropdowns\" class=\"codepen\">See the Pen <a href=\"https:\/\/codepen.io\/_jt\/pen\/YrJMKo\/\">Responsive navigation with dropdowns<\/a> by JT (<a href=\"https:\/\/codepen.io\/_jt\">@_jt<\/a>) on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<\/div>\n<h2>That&#8217;s all, folks!<\/h2>\n<p>Obviously there\u2019s a lot more little things that go into the navigation that you see on the GoSquared site today (icons, arrows, and a few more other bits specific to mobile), but hopefully this post has helped explain the interesting parts of how we built the new navigation for GoSquared.<\/p>\n<p>Have any thoughts? Anything we could have done differently or better? <a href=\"https:\/\/twitter.com\/gosquared\" target=\"_blank\" rel=\"noopener noreferrer\">Let us know via Twitter<\/a>!<\/p>\n<p><script async src=\"https:\/\/production-assets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently rolled out an update to the main navigation on the GoSquared site. If you\u2019ve been to gosquared.com lately,&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1452],"tags":[],"class_list":["post-1365","post","type-post","status-publish","format-standard","hentry","category-engineering"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.6 (Yoast SEO v19.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to build semantic, responsive website navigation without JavaScript - GoSquared Blog<\/title>\n<meta name=\"description\" content=\"How to build responsive website navigation with popover menus without using JavaScript. Instructions and helpful code snippets inside!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build semantic, responsive website navigation without JavaScript\" \/>\n<meta property=\"og:description\" content=\"How to build responsive website navigation with popover menus without using JavaScript. Instructions and helpful code snippets inside!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation\" \/>\n<meta property=\"og:site_name\" content=\"GoSquared Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GoSquared\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-23T13:07:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-11-28T11:13:02+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.gosquared.com\/images\/liquidicity\/17_10_23_nav_twitter_01@2x.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@floopily\" \/>\n<meta name=\"twitter:site\" content=\"@GoSquared\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"JT\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\",\"name\":\"GoSquared\",\"url\":\"https:\/\/www.gosquared.com\/blog\/\",\"sameAs\":[\"https:\/\/instagram.com\/gosquaredteam\",\"https:\/\/www.linkedin.com\/company\/go-squared-ltd.\",\"https:\/\/www.facebook.com\/GoSquared\",\"https:\/\/twitter.com\/GoSquared\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png\",\"contentUrl\":\"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png\",\"width\":1270,\"height\":250,\"caption\":\"GoSquared\"},\"image\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#website\",\"url\":\"https:\/\/www.gosquared.com\/blog\/\",\"name\":\"GoSquared Blog\",\"description\":\"Turn visitors into customers.\",\"publisher\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.gosquared.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#webpage\",\"url\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation\",\"name\":\"How to build semantic, responsive website navigation without JavaScript - GoSquared Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#primaryimage\"},\"datePublished\":\"2017-10-23T13:07:10+00:00\",\"dateModified\":\"2019-11-28T11:13:02+00:00\",\"description\":\"How to build responsive website navigation with popover menus without using JavaScript. Instructions and helpful code snippets inside!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.gosquared.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to build semantic, responsive website navigation without JavaScript\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#webpage\"},\"author\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef\"},\"headline\":\"How to build semantic, responsive website navigation without JavaScript\",\"datePublished\":\"2017-10-23T13:07:10+00:00\",\"dateModified\":\"2019-11-28T11:13:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#webpage\"},\"wordCount\":970,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef\",\"name\":\"JT\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g\",\"caption\":\"JT\"},\"description\":\"JT is a co-founder and the lead front-end engineer at GoSquared. He's responsible for the shiniest of the shiny projects we work on.\",\"sameAs\":[\"https:\/\/twitter.com\/floopily\"],\"url\":\"https:\/\/www.gosquared.com\/blog\/author\/jt\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to build semantic, responsive website navigation without JavaScript - GoSquared Blog","description":"How to build responsive website navigation with popover menus without using JavaScript. Instructions and helpful code snippets inside!","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:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation","og_locale":"en_US","og_type":"article","og_title":"How to build semantic, responsive website navigation without JavaScript","og_description":"How to build responsive website navigation with popover menus without using JavaScript. Instructions and helpful code snippets inside!","og_url":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation","og_site_name":"GoSquared Blog","article_publisher":"https:\/\/www.facebook.com\/GoSquared","article_published_time":"2017-10-23T13:07:10+00:00","article_modified_time":"2019-11-28T11:13:02+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.gosquared.com\/images\/liquidicity\/17_10_23_nav_twitter_01@2x.jpg","twitter_creator":"@floopily","twitter_site":"@GoSquared","twitter_misc":{"Written by":"JT","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.gosquared.com\/blog\/#organization","name":"GoSquared","url":"https:\/\/www.gosquared.com\/blog\/","sameAs":["https:\/\/instagram.com\/gosquaredteam","https:\/\/www.linkedin.com\/company\/go-squared-ltd.","https:\/\/www.facebook.com\/GoSquared","https:\/\/twitter.com\/GoSquared"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png","contentUrl":"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png","width":1270,"height":250,"caption":"GoSquared"},"image":{"@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/www.gosquared.com\/blog\/#website","url":"https:\/\/www.gosquared.com\/blog\/","name":"GoSquared Blog","description":"Turn visitors into customers.","publisher":{"@id":"https:\/\/www.gosquared.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gosquared.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#primaryimage","url":"","contentUrl":""},{"@type":"WebPage","@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#webpage","url":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation","name":"How to build semantic, responsive website navigation without JavaScript - GoSquared Blog","isPartOf":{"@id":"https:\/\/www.gosquared.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#primaryimage"},"datePublished":"2017-10-23T13:07:10+00:00","dateModified":"2019-11-28T11:13:02+00:00","description":"How to build responsive website navigation with popover menus without using JavaScript. Instructions and helpful code snippets inside!","breadcrumb":{"@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gosquared.com\/blog"},{"@type":"ListItem","position":2,"name":"How to build semantic, responsive website navigation without JavaScript"}]},{"@type":"Article","@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#article","isPartOf":{"@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#webpage"},"author":{"@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef"},"headline":"How to build semantic, responsive website navigation without JavaScript","datePublished":"2017-10-23T13:07:10+00:00","dateModified":"2019-11-28T11:13:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#webpage"},"wordCount":970,"commentCount":0,"publisher":{"@id":"https:\/\/www.gosquared.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#primaryimage"},"thumbnailUrl":"","articleSection":["Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gosquared.com\/blog\/semantic-responsive-website-navigation#respond"]}]},{"@type":"Person","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef","name":"JT","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g","caption":"JT"},"description":"JT is a co-founder and the lead front-end engineer at GoSquared. He's responsible for the shiniest of the shiny projects we work on.","sameAs":["https:\/\/twitter.com\/floopily"],"url":"https:\/\/www.gosquared.com\/blog\/author\/jt"}]}},"wps_subtitle":"Building beautiful website navigation with popover menus using just HTML and CSS","_links":{"self":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts\/1365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/comments?post=1365"}],"version-history":[{"count":0,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts\/1365\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/media?parent=1365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/categories?post=1365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/tags?post=1365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}