HTML <embed> width Attribute

The width attribute on an <embed> tag sets the width of the embedded element. The width is specified in pixels -- without the ‘px‘ unit.

Example

#

A width attribute on an <embed> element.
The width attribute overrides the original embedded object width.

<embed  width="300"
        src="/img/html/vangogh-bedroom.jpg">

Using width

The width attribute specifies the width of the embedded item.

The width is defined in pixels, without the 'px' unit.

To define the width in % or another unit, use the CSS width property.


Syntax

<embed src="URL" width="pixels">

Note: The width attribute requires that src has a value.

Values

#

Value Description
pixels A number (e.g. 250).

Browser support

Here is when width support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <embed>
Guides