How to Set the Size on an Image in HTML


Images are a common way that you can enhance your web page. If you have a large or oversized image, you may want to set its size directly through the HTML code for the web page. After adding the image to your web page, you can use the width and height tags to configure the size of the image.

  • Open the HTML file of your website with a text editor, such as Notepad or Wordpad.

  • Locate the image tag within the HTML file. For example, the HTML tag for image.jpg in the website would look like:

    <img src="image.jpg">

  • Add the width and height attributes to the image tag to set the size of the image. For example, to set image.jpg's width to 200 and the height to 150, the HTML tag for the image would look like this:

    <img src="image.jpg" width="200" height="150">

  • Save the file.

Related Searches


  • Photo Credit ruler image by Oleg Kapustin from
Promoted By Zergnet


Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!