HTML5 Question:
Download Questions PDF

Tell me How to add video and audio in HTML5

Answer:

The canvas element is used to draw graphics images on a web page by using javascript like below

Like below we can add video in html5

<video width=“320″ height=“240″ controls=“controls”>
<source src=“mysong.mp4″ type=“video/mp4″ />
<source src=“mysong.ogg” type=“video/ogg” />
</video>

And audio like this

<audio controls=“controls”>
<source src=“mysong.ogg” type=“audio/ogg” />
<source src=“mysong.mp3″ type=“audio/mpeg” />
</audio>

Download HTML5 Interview Questions And Answers PDF

Previous QuestionNext Question
Explain What is the use of localStorage in HTML5?Tell me Do you know New Input Type Attribute in HTML5