<img src="mycoolpic.gif"
alt="description" |
Sets the width of your graphic Sets the height of your graphic |
img
element with the src
attribute along with an appropriate value. However if you really want to optimize how web browsers display your graphics, you should also take care to use other attributes as well, most particularly alt
, width
and height
. These are detailed below:
alt
- For various reasons, some people may not be able to see your web page graphics. This may be due to disability or could also be the result of browser options set to not display graphics. Some people who have slow internet connection speeds will turn off the display of graphics in their browsers to speed up the loading of web pages. If you are currently using Internet Explorer, you can turn this option on or off by clicking on Tools » Internet Options » Advanced and then in the list of Settings scroll down to locate 'Show Pictures'. Clicking to check or clicking to clear this box will respectively turn on or off the display of graphics in your browser. alt
attribute, you can insert text to give visitors a brief description that will replace any missing graphics. (Internet Explorer users that can view graphics may hover their mouse pointer over them to see the alt
text as a tool tip.) For example, the following code will display mycoolpic.gif
with the alt
text set to 'My Cool Picture':<img src="mycoolpic.gif" alt="My Cool Picture">
alt
attribute and filling in the value with appropriate text is considered good manners on the internet.width, height
- By taking care to specify the dimensions of all your graphics, browsers will preassign this space as they load pages. This keeps the entire page from resizing every time a browser finally figures out how big each graphic is (by initiating its download) and hence makes for faster and smoother page loading. To specify the dimensions of your graphics, use the width
and height
attributes in the img
tag. Using mycoolpic.gif
as an example:<img src="mycoolpic.gif" alt="My Cool Picture"
width="150" height="100">
width
and height
are specified as lengths in pixels. Almost all graphic editors will provide you with this information. If you don't have a graphics editor because, for example, you are using free clip-art that you've downloaded off the internet, you can still get the dimensions of your graphic by inserting just the basic source code to render an image. Save your work and then open up your web page in a browser (Internet Explorer, Netscape, Mozilla or Opera), right-click on your graphic and then click on Properties (if you're using Opera, click on Image Properties). The pop-up dialog will then furnish you with the dimensions in pixels of your graphic.
Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates
See also:
If you need a .COM web address, you can get one quick and easy at...
<~BACK | TOP | NEXT ~> |