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.
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>