Validator.w3.org says there is no attribute

I went to http://validator.w3.org/ to check my web page and I saw this essentially:

When it checked my video player code:

<video type="video/mp4" poster="../video/alana.jpg" src="../video/alana.mp4"></video>

It basically said:

"Error Line 337…there is no attribute “type”

Error Line 337…there is no attribute “poster”

Error Line 337…there is no attribute “src”

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element."

Is my player line of code incorrect? It seems to play the video successfully. What is the alternative to my line of code if my attributes are all wrong?

Any chance of a website?

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

That’s an example of HTML5 video…using <source>.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.