Comments: This article mainly introduces the definition and usage of HTML5 embed labels. For more information, see definitions and usage.
<Embed> labels define embedded content, such as plug-ins.
Instance
<Embed src = "helloworld.swf"/>
Differences between HTML 4.01 and HTML 5
<Embed> A tag is a new tag in HTML 5.
Attribute
New: new attribute in HTML5.
Attribute |
Value |
Description |
Height |
Pixels |
Set the height of the embedded content. |
Src |
Url |
The URL of the embedded content. |
Type |
Type |
Defines the type of embedded content. |
Width |
Pixels |
Set the width of the embedded content. |
It is a new tag in HTML 5. In fact, it is no stranger in HTML 4.
Why is it a chicken rib?
This is because the value of the src attribute must specify the actual file extension. For example, if you want to use it to play mp3 files,
The file extension in the url must be mp3. If you want to use a dynamic web page
For example, "getMp3.php? Id = 12321 ", it cannot be played at all,
Even if you specify the type attribute "audio/mpeg3", it cannot recognize it as an mp3 file.