Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Integrating Video into Web Pages | Images and Media
HTML Essentials
course content

Kursinnehåll

HTML Essentials

HTML Essentials

1. Understanding the Web and HTML
2. HTML Fundamentals
3. Images and Media
4. Tables and Forms
5. Advanced HTML

book
Integrating Video into Web Pages

Embedding a video is similar to embedding an audio. The attributes and tags used are comparable. Let's take a detailed view.

Embedding Video

The <video> tag embeds video content into an HTML document, allowing users to play videos directly within the browser.

Video Attributes

  • controls: Adds video controls for play, pause, and volume adjustment;
  • autoplay: Specifies autoplay functionality;
  • loop: Allows continuous video looping.

Example:

html

Source

The <source> tag is used within the <video> tag to specify the source (URL) of the video file and its attributes. src specifies the URL of the video file. type specifies the MIME type of the video file.
Example:

html

In the example above:

  • The <video> tag includes controls, autoplay, and loop attributes;
  • The <source> tags specify the source URLs of the video files and their MIME types;
  • If the browser does not support the <video> tag or the specified video formats, the alternative text Your browser does not support the video element. is displayed.
html

index.html

copy

Video Tutorial

1. Which tag is used to embed video content into an HTML document?

2. What attribute of the <video> and <audio> tags adds controls like play, pause, and volume adjustment?

question mark

Which tag is used to embed video content into an HTML document?

Select the correct answer

question mark

What attribute of the <video> and <audio> tags adds controls like play, pause, and volume adjustment?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 5
Vi beklagar att något gick fel. Vad hände?
some-alt