<body> <h2>Set the height and width of elements</h2> <p>Original image:</p> <img class="one" src="http://timoday.edu.vn/wp-content/uploads/2017/08/ocean.jpg" width="300" height="300"><br> <p>Sized image (200x200 pixels):</p> <img class="two" src="http://timoday.edu.vn/wp-content/uploads/2017/08/ocean.jpg" width="300" height="300"><br> <p>The height and width of this div element is 300px:</p> <div class="three"></div> </body>
img.one { height: auto; } img.two { height: 200px; width: 200px; } div.three { height: 300px; width: 300px; background-color: powderblue; }