Change the width of an embedded file to 500 pixels:
The width property sets or returns the value of the width attribute in an <embed> element.
The width attribute specifies the width of the embedded content, in pixels.
Tip: Use the height property to set or return the value of the height attribute in an <embed> element.
The width property is supported in all major browsers.
Return the width property:
Set the width property:
Value | Description |
---|---|
pixels | Specifies the width of the embedded content in pixels (e.g. width="100") |
Return Value: | A Number, representing the width of the embedded content, in pixels |
---|
Return the width of an embedded file:
The result of x will be:
Change the height and width of an embedded file to 500 pixels:
HTML reference: HTML <embed> width attribute