HTMLEmbedElement: width property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("HTML DOM")}}

The **width** property of the {{domxref("HTMLEmbedElement")}} interface returns a string that reflects the width attribute of the {{HTMLElement("embed")}} element, indicating the displayed width of the resource in CSS pixels.

Value

A string indicating the displayed width of the resource in CSS pixels.

Examples

html
<embed id="el" width="800" height="600" src="https://example.com" />
js
const el = document.getElementById("el");
console.log(el.width); // Output: '800'

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLCanvasElement.width")}}
  • {{domxref("HTMLIFrameElement.width")}}
  • {{domxref("HTMLImageElement.width")}}
  • {{domxref("HTMLObjectElement.width")}}
  • {{domxref("HTMLSourceElement.width")}}
  • {{domxref("HTMLVideoElement.width")}}