MDN self-hosted library · e01.org

HTMLCanvasElement: height property

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

html
<canvas id="canvas" width="300" height="300"></canvas>
js
const canvas = document.getElementById("canvas");
console.log(canvas.height); // 300