revision:
The height attribute can be used on the following elements: <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video>.
<canvas height="pixels | %"></ >
<embed height="pixels | %"></ >
<iframe height="pixels | %"></ >
<img height="pixels | %"></ >
<input height="pixels | %"></ >
<object height="pixels | %"></ >
<video height="pixels | %"></ >
Attribute values:
pixels: it sets the height of the cell in terms of pixels.
%: it sets the height of the cell in terms of percentage (%).
<canvas id="myCanvas" width="200" height="200" style="border:1px solid; margin-left: 3vw;"> Your browser does not support the HTML5 canvas tag. </canvas> <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.fillStyle = "#92B901"; ctx.fillRect(50, 50, 100, 100); </script>
<iframe src="../../pics/car2.jpg" width="400" height="200" style="margin-left: 3vw;"> <p>Your browser does not support iframes.</p> </iframe>