From the course: HTML Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Navigation

Navigation - HTML Tutorial

From the course: HTML Essential Training

Start my 1-month free trial

Navigation

- Now that we know how to make a link, and how to structure our URLs, let's look at some of the most common patterns for creating a menu or a navigation bar. Let's say we want to make a main menu bar for our website. There are four links here. The words home, people, prices and contact. We've wrapped each of them in an a element with the correct URL, and then I've wrapped each link in a li for list item. This is a list of links. The whole list is wrapped in a ul because the order of the links isn't that important. It's an unordered list, and now, I'm going to wrap the whole thing in a nav element. The nav element is for marking up navigation. It tells the browser which sets of links are part of the site navigation. We don't use it all the time, just for major blocks of navigational links. You could see the results on the right. It looks like a nice main menu bar. Now, of course, it doesn't look this way because of…

Contents