- From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Date: Sat, 05 Jan 2013 15:46:20 +0100
- To: HiddenId <courriel_achevrier@yahoo.fr>
- Cc: "www-amaya@w3.org" <www-amaya@w3.org>
HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT): > I'm trying to insert a video in an HTML page. > I've tried a w3school code example : > > <video width="320" height="240" controls> > <source src="movie.mp4" type="video/mp4"> > <source src="movie.ogg" type="video/ogg"> > <source src="movie.webm" type="video/webm"> > <object data="movie.mp4" width="320" height="240"> > <embed src="movie.swf" width="320" height="240"> > </object> > </video> > Unfortunatly, Amaya returns "an error code": invalid token > It seems it is the "s" of controls which generate the error. > > Do you know what I should do to avoid this error ? Firstly, assuming that you work with an XHTML document, then, instead of controls, you should write controls="" or controls="controls". Then that particular error message will disappear. This is because XML requires boolean attributes to be of the shape foo="foo" or foo="". By contrast, HTML permits the author to type foo (the HTML browser will still think of it as foo="", however). Secondly, the empty <source/> elements must be equipped with a closing "/", since that is the canonical form of empty elements in XHTML. All in all, this would work: <video width="320" height="240" controls=""> <source src="movie.mp4" type="video/mp4" /> <source src="movie.ogg" type="video/ogg" /> <source src="movie.webm" type="video/webm" /> <object data="movie.mp4" width="320" height="240"> <embed src="movie.swf" width="320" height="240" /> </object> </video> -- leif halvard silli
Received on Saturday, 5 January 2013 14:46:44 UTC