MDN self-hosted library · e01.org

HTMLVideoElement: poster property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<video
  id="media"
  src="https://example.com/video.mp4"
  poster="https://example.com/poster.jpg"></video>
js
const el = document.getElementById("media");
console.log(el.poster); // Output: "https://example.com/poster.jpg"