Top-notch Web Design

See Our Most Recent Web Design Work

Lease A Website

Save With Innovative Website Lease Deals!

Contact Us

581 Boylston St. Suite 604
Boston, MA 02116
Tel: (617) 535-7653

Why you should assign proper height and width attributes to the images on your website

Basically, almost every web user knows how to insert an image onto a web page, but not every web designer knows how to assign the necessary attributes that enhance presentation and accessibility.

Image Height and Width

When an image on a web page downloads on a browser, a box is automatically created to indicate its position on the page. If this box has a wrong, smaller size, every other element on the page has to be repositioned to make room for the bigger image. This subsequently messes up the entire page layout, and we know you don’t want that to happen on your business website. To avoid this issue, make sure you properly set the dimensions of the images on web pages in pixels. Doing this instructs web browsers to reserve that exact space your image requires. This ensures there won’t be any need for post-loading shifting and page layout will always remain correct.

For example, you can set an image height and width attributes in your HTML code like this:

<img src=”boston-web-design.jpg” height=”40″ width=”250″>

The advantages of correctly assigning image sizes are:

  • Your web page will load faster on web browsers, as everything is properly positioned. This is one of the best ways to optimize page speed, which is now one of Google’s search ranking factors.
  • It prevents messing up the content of your web pages.
  • When your site’s visitors turn off images on their browsers, the page layout will still remain the same.

So, when designing a website, ask your web designer to make sure all images are given the proper dimensions. This is one of web design best practices, and as you’ve seen, there are many benefits!


No comments yet.

Add a comment

* mandatory fields