mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): clarify source element usage with video element (#65013)
Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com>
This commit is contained in:
+20
@@ -114,6 +114,26 @@ For the `src`, or source attribute, we are using a video called "Big Buck Bunny"
|
||||
></video>
|
||||
```
|
||||
|
||||
You can also use the `source` element inside a `video` element, just like you did with the `audio` element. This lets you provide the same video in multiple formats, and the browser will choose the first one it can play.
|
||||
|
||||
```html
|
||||
<video
|
||||
controls
|
||||
width="400"
|
||||
poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217"
|
||||
>
|
||||
<source
|
||||
src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
|
||||
type="video/mp4"
|
||||
/>
|
||||
<source
|
||||
src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.webm"
|
||||
type="video/webm"
|
||||
/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
```
|
||||
|
||||
# --questions--
|
||||
|
||||
## --text--
|
||||
|
||||
Reference in New Issue
Block a user