Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

Necessary to add the height and width to the img
(1 viewing) (1) Guest
All your queries regarding HTML will be solved in this forum
  • Page:
  • 1
TOPIC:

Necessary to add the height and width to the img

Necessary to add the height and width to the img 1 year, 5 months ago #366

  • isaac
  • OFFLINE
  • Senior Boarder
  • Posts: 64
  • Karma: 0
Is it necessary to add the height and width to the img src tag?

Re: Necessary to add the height and width to the img 1 year, 5 months ago #380

  • shama
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 0
Yes. Adding the height and width attributes to your IMG SRC HTML tag allows the browser to properly size the images as the page is loading. Without these values the browser will not know how to properly size each image and will only be able to determine the size of the image after it has been loaded.

You'll notice web pages that do not have their image dimensions specified, since the overall size and layout of the page will change as the page is loaded. This will often confuse the user and/or distract them as they are trying to read the content on the page.
  • Page:
  • 1
Time to create page: 1.18 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download