HTML embed tag usage and attributes detailed explanation

HTML embed tag usage and attributes detailed explanation

1. Basic grammar


Copy code
The code is as follows:

embed src=url

Note: embed can be used to insert various multimedia, the formats can be Midi, Wav, AIFF, AU, MP3, etc., Netscape and the new version of IE support it. url is the audio or video file and its path, which can be a relative path or an absolute path.

Example:

Copy code
The code is as follows:
<embed src="your.mid">

2. Attribute settings

1. Automatic playback:

Syntax: autostart=true, false
Description: This property specifies whether the audio or video file should be played automatically after downloading.
true: the music file will be played automatically after downloading;
false: The music file will not play automatically after downloading.
Example:

Copy code
The code is as follows:

<embed src="your.mid" autostart=true>
<embed src="your.mid" autostart=false>


2. Loop playback:

Syntax: loop=positive integer, true, false
Description: This property specifies whether an audio or video file should loop and how many times it should loop.
When the attribute value is a positive integer, the number of loops of the audio or video file is the same as the positive integer value;
When the property value is true, the audio or video file loops;
When the property value is false, the audio or video file does not loop.

Example:

Copy code
The code is as follows:
<embed src="your.mid" autostart=true loop=2>
<embed src="your.mid" autostart=true loop=true>
<embed src="your.mid" autostart=true loop=false>

3. Panel display:

Syntax: hidden=true,no
Description: This property specifies whether the control panel is displayed. The default value is no.
true: hide the panel;
no: Display the panel.

Example:

Copy code
The code is as follows:
<embed src="your.mid" hidden=true>
<embed src="your.mid" hidden=no>

4. Start time:

Syntax: starttime=mm:ss (minutes:seconds)
Description: This attribute specifies the time when the audio or video file starts playing. If undefined, play from the beginning of the file.
Example:

Copy code
The code is as follows:
<embed src="your.mid" starttime="00:10">

5. Volume:

Syntax: volume=an integer between 0 and 100. Description: This attribute specifies the volume of the audio or video file. If not defined, the system's own settings are used.
Example:

Copy code
The code is as follows:
<embed src="your.mid" volume="10">


6. Container properties:

Syntax: height=# width=#
Note: The value is a positive integer or percentage, in pixels. This property specifies the height and width of the control panel.
height: the height of the control panel;
width: The width of the control panel.
Example:

Copy code
The code is as follows:
<embed src="your.mid" height=200 width=200>

7. Container unit:

Syntax: units=pixels,en
Description: This property specifies the height and width in pixels or en.
Example:

Copy code
The code is as follows:
<embed src="your.mid" units="pixels" height=200 width=200>
<embed src="your.mid" units="en" height=200 width=200>


8. Appearance settings:

Syntax: controls=console, smallconsole, playbutton, pausebutton, stopbutton, volumelever Description: This property specifies the appearance of the control panel. The default value is console.
console: general normal panel;
smallconsole: a smaller panel;
playbutton: only display the play button;
pausebutton: only display the pause button;
stopbutton: only display the stop button;
volumelever: Only the volume adjustment button is displayed.

Example:

Copy code
The code is as follows:
<embed src="your.mid" controls=smallconsole>
<embed src="your.mid" controls=volumelvever>


9. Object name:

Syntax: name=#
Note: # is the name of the object. This property gives the object a name so that other objects can use it.
Example:

Copy code
The code is as follows:
<embed src="your.mid" name="video">

10. Description:

Syntax: title=#
Description: # is the text of the description. This attribute specifies the description text of an audio or video file.
Example:

Copy code
The code is as follows:
<embed src="your.mid" title="First Song">

11. Foreground and background colors:

Syntax: palette=color|color
Description: This property represents the foreground and background colors of the embedded audio or video file. The first value is the foreground color, and the second value is the background color, separated by |. color can be an RGB color (RRGGBB), a color name, or transparent.
Example:

Copy code
The code is as follows:
<embed src="your.mid" palette="red|black">


12. Alignment:

Syntax: align=top, bottom, center, baseline, left, right, texttop, middle, absmiddle, absbottom
Description: This property specifies the alignment of the control panel and objects in the current row.
center: The control panel is centered;
left: the control panel is on the left;
right: the control panel is on the right;
top: The top of the control panel is aligned with the top of the tallest object in the current row;
bottom: The bottom of the control panel is aligned with the baseline of the objects in the current row;
baseline: The bottom of the control panel is aligned with the baseline of the text;
texttop: The top of the control panel is aligned with the top of the tallest text in the current line;
middle: The middle of the control panel is aligned with the baseline of the current row;
absmiddle: The middle of the control panel is aligned with the middle of the current text or object;
absbottom: The bottom of the control panel is aligned with the bottom of the text.

Example:

Copy code
The code is as follows:
<embed src="your.mid" align=top>
<embed src="your.mid" align=center>

<<:  How to use CSS3 to implement a queue animation similar to online live broadcast

>>:  The role and methods of information communication in website visual design (picture and text)

Recommend

Manually install mysql5.7.10 on Ubuntu

This tutorial shares the process of manually inst...

Detailed tutorial on VMware installation of Linux CentOS 7.7 system

How to install Linux CentOS 7.7 system in Vmware,...

Troubleshooting of master-slave delay issues when upgrading MySQL 5.6 to 5.7

Recently, when upgrading the Zabbix database from...

Detailed explanation of slots in Vue

The reuse of code in vue provides us with mixnis....

SQL interview question: Find the sum of time differences (ignore duplicates)

When I was interviewing for a BI position at a ce...

Vue implementation example using Google Recaptcha verification

In our recent project, we need to use Google robo...

In-depth explanation of MySQL stored procedures (in, out, inout)

1. Introduction It has been supported since versi...

Summary of common sql statements in Mysql

1. mysql export file: SELECT `pe2e_user_to_compan...

js to create a carousel effect

I think the carousel is a relatively important po...

Cause Analysis and Solution of I/O Error When Deleting MySQL Table

Problem phenomenon I recently used sysbench to te...

Detailed installation tutorial of mysql 5.7 under CentOS 6 and 7

You always need data for development. As a server...