O'Reilly logo

HTML5 Multimedia Development Cookbook by Lee Jordan, Dale Cruse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling a nav block element

When creating the HTML5 spec, analysis was done and determined that one of the most used elements was <div id="nav"> or <div id="navigation">. With HTML5 there's no more need for that. Instead we have the semantically rich <nav>. Now let's get to work styling it.

Getting ready

Let's examine how the http://css3maker.com site uses the new semantically rich <nav> element.

Getting ready<nav> elementabout

How to do it...

If we view the source of the homepage, we'll find this snippet:

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CSS3.0 Maker | CSS3.0 Generator | CSS 3.0 Generator </title> <link href="style/style.css" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required