HTML5: How to specify the URL of the video file?
Solution:
HTML Code:
Explanation:
- The HTML code defines a video element using the <video> tag.
- The width attribute is set to 300 pixels and the height attribute is incorrectly set to "hight" instead of "height", specifying the dimensions of the video player. This is a typo in the code.
- The controls attribute is included to display video controls, allowing users to interact with the video playback.
- The src attribute specifies the URL of the video file ("https://www.w3resource.com/html-css-exercise/basic/solution/php-demo1.ogg").
- This code creates a video player with the specified source URL, allowing users to view and control the video playback within the web page.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.