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

Setting elements to display:block

By default, modern browsers assign the new HTML5 elements to display:block. But also by default, older browsers and most versions of Internet Explorer fall back to display:inline natively. If you've worked with CSS before, you can see trouble coming a mile away. First thing we're going to do is fix it before it can become a problem.

Getting ready

First, let's identify all the new elements in HTML5. These include:

  • <article>
  • <aside>
  • <audio>
  • <canvas>
  • <command>
  • <datalist>
  • <details>
  • <embed> - not a new tag, but it finally validates in HTML5
  • <figcaption>
  • <figure>
  • <footer>
  • <header>
  • <hgroup>
  • <keygen>
  • <mark>
  • <meter>
  • <nav>
  • <output>
  • <progress>
  • <rp>
  • <rt>
  • <ruby>
  • <section>
  • <source>
  • <summary>
  • <time>
  • <video>
  • <wbr>

How to do it...

We'll start with our usual ...

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