Current location - Education and Training Encyclopedia - Resume - How to insert a video into an HTML page?
How to insert a video into an HTML page?
There are two ways to insert video into HTML, one is the old object tag, and the other is the video tag in html5.

The former is relatively compatible, while the latter is a headache.

Examples are as follows:

& ltvideo width = " 602 px " height = " 345 px " controls = " controls " & gt; ?

& ltsource src = " public/video/test . MP4 " type = " video/MP4 " >& lt/source & gt; ?

& ltsource src = " public/video/test . ogg " type = " video/ogg " & gt; & lt/source & gt; ?

Your browser doesn't support video tags?

& lt/video & gt; ?

At present, the video element supports three video formats:?

Format IE Firefox Opera Chrome Safari?

Og No 3.5+ 10.5+ 5.0+ No?

MPEG 4 9.0+ No No 5.0+ 3.0+?

WebM No 4.0+ 10.6+ 6.0+ No?

Ogg = ogg file with Theora video coding and Vorbis audio coding?

MPEG4 = MPEG 4 file with H.264 video coding and AAC audio coding?

WebM = WebM file with VP8 video encoding and Vorbis audio encoding?

Note: the format must meet the above three details, such as MPEG 4, H.264 video and AAC audio.

Extended data:

Hypertext markup language

Hypertext Markup Language, Application of Standard generalized markup language.

"Hypertext" means that a page can contain non-text elements such as pictures, links and even music and programs.

The structure of hypertext markup language includes a "Head" part and a "Body" part, in which the "head" part provides information about the web page and the "body" part provides the specific content of the web page.

Reference link: HTML_ Baidu encyclopedia