课程: HTML and CSS: Creating Navigation Bars

今天就学习课程吧!

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

Adding an icon to the link in an accessible way

Adding an icon to the link in an accessible way

课程: HTML and CSS: Creating Navigation Bars

Adding an icon to the link in an accessible way

- [Instructor] On occasion, you may wish to add icons to your navigation. These might be social media icons, or they might be icons in addition to the text in the nav bar itself, unless the icon is instantly recognizable, like social media icons, you should always have a text equivalent next to your navigation button names. In other words, where everybody can see it. Of course, you're going to have some kind of alt text for people who need an alternative to the picture. But even for people who have no disabilities, they need to have text next to your icons in your navigation. Otherwise you wind up with the dreaded mystery meat navigation, which is a term popularized by Vincent Flanders in his absolutely fantastic book called "Webpages That Suck", which was published in 1998. In our case, we are going to be working with Font Awesome today. And we're going to add two icons to our navigation. We're going to add a home icon, and we're going to add an icon for Twitter, just as you get some…

内容