[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 299
  • Last Modified:

Width and Height specifications

Hi,
When specifiying an image in an HTML document , should the width and heigh be specified?

as a submit:
<input name="save" type="image"   src="images/saveButton.jpg"  width="20" height="10" alt="Save Button" />

or as as a regular image:

<img src="images/SumPaymentTab.jpg" alt="Payment Information" width="888" height="37" />

Or as a link:
<a href="AMbilling.cfm?fpage=menu"><img src="images/EditButton.jpg"
               alt="Edit Billing Information" width="86" height="28" border="0"/></a>



I read this is a "best practice as the Browser reserves space as it loades the page BUT when I change a buuton used in many pages, I don't want to have to change the dimensions?

Thanks in advance,
hefterr
0
hefterr
Asked:
hefterr
  • 3
  • 2
1 Solution
 
designatedinitializerCommented:
nevermind about image dimensions, if you have the images with the proper dimensions.
It isn't required. It can optimize, eventually --- minimizing page load times, but the difference is negligible, if noticeable.
0
 
designatedinitializerCommented:
PS: IMHO, less coding is also optimization: if you don't put the dimensions, that's about 26 characters less for any given image.
0
 
hefterrAuthor Commented:
Hi designatedinitializer,
Thanks for the reply.  I'm not sure what you meant by :
>> It can optimize, eventually  ??

hefterr
0
 
designatedinitializerCommented:
what I mean is that it may be true that the browser loads the page a little bit faster if you provide width and height in advance, but I have my doubts.
0
 
hefterrAuthor Commented:
Thanks.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now