Home  >  Article  >  Web Front-end  >  Detailed explanation of the usage and attributes of HTML embed tag_HTML/Xhtml_Web page production

Detailed explanation of the usage and attributes of HTML embed tag_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:38:082232browse

1. Basic syntax


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 new versions of IE support it. . The url is the audio or video file and its path, which can be a relative path or an absolute path.

Example:

Copy the code
The code is as follows:

2. Attribute settings

1. Automatic playback:

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

Copy code
The code is as follows:




2. Loop playback:

Syntax: loop=positive integer, true, false
Description: This attribute specifies whether the audio or video file is looped and the number of loops.
When the attribute value is a positive integer value, the number of loops of the audio or video file is the same as the positive integer value;
When the attribute value is true, the audio or video file loops;
When the attribute value is false, the audio or video file loops Video files do not loop.

Example:

Copy the code
The code is as follows:


3. Panel display:

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

Example:

Copy the code
The code is as follows:

4. Start time:

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

Copy the code
The code is as follows:

5. Volume:

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

Copy the code
The code is as follows:


6. Container attributes:

Syntax: height=# width=#
Description: Take The value is a positive integer or percentage, and the unit is 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 the code
The code is as follows:

7. Container units:

Syntax: units=pixels, en
Description: This attribute specifies the unit of height and width as pixels or en.
Example:

Copy the code
The code is as follows:



8. Appearance settings:

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

Example:

Copy the code
The code is as follows:



9. Object name:

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

Copy the code
The code is as follows:

10. Description:

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

Copy the code
The code is as follows:

11. Foreground and background colors:

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

Copy the code
The code is as follows:


12. Alignment:

Syntax: align=top, bottom, center, baseline, left, right, texttop, middle, absmiddle, absbottom
Description: This attribute specifies the alignment of objects in the control panel and the current row.
center: the control panel is in the center;
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 object 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 highest text in the current row Alignment;
middle: The middle of the control panel is aligned with the baseline of the current line;
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 the code
The code is as follows:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn