[whatwg] Closing tags for empty content model
Tab Atkins Jr.
jackalmage at gmail.com
Mon Sep 28 19:21:11 PDT 2009
On Mon, Sep 28, 2009 at 9:18 PM, Marius Gundersen <gundersen at gmail.com> wrote:
> Shouldn't you always close the tags, either self-closing or with a separate
> close tag? That is, this is the correct way to do it:
>
> <video width="640" height="360" style="color:red">
> <source src="bunny.ogv" type="video/ogg" />
> <source src="bunny.mp4" type="video/mp4" />
> </video>
> <p>Text after the video element.</p>
In the HTML syntax of HTML5, no, void elements do *not* have to be
explicitly closed. You *can* put the trailing slash on them, but it
doesn't do or mean anything; it's simply ignored.
~TJ
More information about the whatwg
mailing list