HTML: Controlling image size

This entry is part 32 of 34 in the series HTML

Image size is expressed in pixels.  If you want, you can specify only the width, the height will be resized proportionally.  Or you can specify the height.

The original image size below is 800 x 600.  We specify the height to 200px.

<!DOCTYPE html>
<head lang='en'>     
    <meta charset='UTF-8'>

<img src='//' height='200'>


We can also provide a fixed size to the image as in:



Series Navigation<< HTML: Clearing a graphic
HTML: Image margin >>