Common multimedia files on webpages include audio files and video files. For online audio and video files, we usually use the embed tag to insert them. Common multimedia files on webpages include audio files and video files. For online audio and video files, we usually use the embed tag to insert them.
Embed Syntax:
Example 1: insert an audio file
Insert audio files
The browser preview is as follows:
Note:
We can see that the use of the embed label to insert audio files also has a playback interface with several simple functional buttons.
Example 2: Insert a video file
Insert audio files
The browser preview is as follows:
Note:
Because the audio and video files are relatively large, we will not provide online testing functions here. However, you can test the code on your computer.
Insert a video using the embed tag. We can also see in the browser that the browser provides a simple operation interface. Embed tags support many video formats, most of which are supported by mainstream formats.
Embedtag supports large video files, such as .mp4,. avi, And. rmvb. If you cannot play a video using the embed tag, it may be because your video format is incorrect or the encoding is incorrect. You can use the format factory to convert the format.
The preceding figure shows how to insert audio and video into webpages in html? For more information, see other related articles in the first PHP community!