O'Reilly logo

Responsive Web Design with HTML5 and CSS3 by Ben Frain

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

Practical usage of HTML5's structural elements

Let's look at some practical examples of these new elements. I think the <header>, <nav>, and <footer> elements are pretty self explanatory so for starters, let's take the current And the winner isn't... home page markup and amend the header, navigation, and footer areas (see highlighted areas in the following code snippet):

<!DOCTYPE html> <html lang="en"> <head> <meta charset=utf-8> <meta name="viewport" content="width=device-width,initial-scale=1.0" /> <title>And the winner isn't…</title> <script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';</script> <link href="css/main.css" rel="stylesheet" /> </head> <body> <div id="wrapper"> <!-- the header and navigation --> ...

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