HTML5 video element with multiple source children does not validate
Posted by jamie on 25 Aug 2011 in Notes
According to the HTML5 spec, this is valid code:
<video controls="controls" width="320" height="256" id="gbua1">
<source src="http://lettuce.tapor.uvic.ca/~taprlans/media/gbua1.m4v" type="video/mp4; codecs="avc1, mp4a""></source>
<source src="http://lettuce.tapor.uvic.ca/~taprlans/media/gbua1.ogv" type="video/ogg; codecs="theora, vorbis""></source>
<p>
<a href="http://lettuce.tapor.uvic.ca/~taprlans/media/gbua1.m4v">Download the video</a>.</p>
</video>
According to the W3 validator, however, it's invalid. Removing one of the source elements gets rid of the validation error. This doesn't affect the performance of the video. So, it's just a case of waiting for the validator to catch up to the standard.