Solved

Width and Height specifications

Posted on 2012-03-28
5
295 Views
Last Modified: 2012-03-30
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
Comment
Question by:hefterr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
designatedinitializer earned 500 total points
ID: 37779737
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
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37779742
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
 
LVL 1

Author Comment

by:hefterr
ID: 37779830
Hi designatedinitializer,
Thanks for the reply.  I'm not sure what you meant by :
>> It can optimize, eventually  ??

hefterr
0
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37780464
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
 
LVL 1

Author Closing Comment

by:hefterr
ID: 37788210
Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question