课程: HTML and CSS: Creating Navigation Bars

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Using HTML to mark up a nav bar

Using HTML to mark up a nav bar

- [Instructor] Every navbar should be coded in exactly the same way, in terms of its HTML. That's a pretty shocking statement to make anywhere on the web. There's always a million different ways to approach any particular problem. But navbars are one pattern that are very straightforward. The HTML should be coded the same way every single time. And the way that I'm going to show you now is the most semantic way. In other words, the most meaningful way to markup your navbars. And it is the most accessible way to markup your navbars so that it's understood by everyone. So let's start with these particular links that I have here. It is a navbar with six items in it, and let's just start going through and marking this up. So you can see what this navigation structure is, and you can use it on every website you build from now until forever. So we're going to start with a nav tag because this is navigation. Nav is an HTML five element that indicates that this is the main navigation for this…

内容