-
Where appropriate do you use text rather than images?
Thousands of hours go into designing fancy graphics. While the graphical impression a website has an impact, the benefits of using text far outweigh those for using images. Using text rather than images has multiple advantages:
- easier to read - especially if a client machine doesn't have the required plug-ins
- download faster - a users patience extends to about 7 seconds.
- easier to update - a simple find and replace, and you don't need to worry about image size distortion
- are able to be found by search engines - if people don't get to your site, what's the point of it being there?
<h1>Welcome to My Page</h1>
- Figure: Good example - this text can be easily rendered by the browser and recognized by search engine
<img src="Images/Heading_Welcome.gif">
- Figure: Bad example - using image for text header
-
Do you store line art and screenshots for the web in GIF format?
Saving your graphics in the right format for the right job is crucial, as it all goes towards affecting the file size of any image. Even though broadband is commonplace in today's on-line world, page load times and file sizes on the web must still be watched closely.
Line art graphics and anything with a limited number of colours but well defined shapes (logos, simple illustrations, screenshots etc), must be saved in GIF format.

- Figure: Bad Example - this graphic is line art, but has mistakenly been saved as a JPEG. It loses definition (look closely - see the "bubble" effect?) and is 4.1kB

- Figure: Good Example - the same graphic, saved as a GIF, is 2.75kB with much cleaner shapes.

- Figure: Bad Screenshot Example - this JPEG is 35kB.

- Figure: Good Screenshot Example - the same screenshot saved as a GIF has cleaner edges and is only 17kB.
When will I use PNG?
PNG is an alternative to GIF, heavily endorsed by some circles, mainly because of its open source and non-commercial nature. It does have some technical advantages, but complete support of the format isn't very widespread yet (Internet Explorer, for example, doesn't have a complete implementation).
PNG boasts:
- Alpha blending (8 bit transparency map support)
- Unlimited and limited colour palettes. This makes it a good alternative to BMP.
- Multiple CRCs so that file integrity can be checked without viewing
In our experience, however, it doesn't have enough of a file size improvement to make switching a must for all web use.
-
Do you store photographs for the web in JPEG format?
In line with the statement above, all photographs will be stored in JPEG format. JPEG is a lossy format - it rationalises the quality of the image by averaging out the colours in segments of the image that it defines. To see an example of this working, try lowering the quality of a JPEG to minimum quality.

- Figure: Bad Example - this photo will not be a GIF - it has too many colours to fit into the 256 colour limit that GIF has, and the result is dithered. File size: 24kB

- Figure: Good Example - the same graphic, saved as a JPEG, is 4.4kB.
-
Do you avoid "plonking" your web page images?
Many designers will simply "plonk" an image onto a web page in between or next to a block of text. This interrupts the flow of the page and gives a disjointed, unprofessional impression.
Two good techniques to "blend" your images into the layout are:
- Drop shadow
- Rounded edges

- Figure: Bad Example - The image does not look like part of the layout; it looks like it was simply "plonked" onto the page

- Figure: Good Example - The rounded edges and drop shadow make the image look like part of the paragraph, rather than a separate unrelated item.
For how to's, see the tutorials on rounded corners in Photoshop
and drop shadows in Photoshop
.
-
Do you avoid having unreadable
screenshot galleries?
Many sites have screenshot galleries that offer a list of all the
screens within an application, and an option to enlarge them.
There's just one problem: you can't see what they contain!

- Figure: Bad Example. The contents of the screenshots are difficult to make out
What we suggest as an alternative is to have one large image (and
possibly a list of descriptions) to allow users to have a large
screenshot to view right from the get go. This might look something
like:

- Figure: Good Example. This is more intuitive. Navigation can be handled by loading the images on the fly with JavaScript if need be.
Our Code Auditor User Guide provide a good example for this rule.
-
Do you avoid BMPs for the Internet at all times?
Never use bitmap images (.BMP format) on your website or in emails. BMP is an uncompressed format, and typically has an unlimited colour palette. This results in unneccessarily large file
sizes, which makes it unsuitable for Internet use.
As an alternative, the most ideal format for Internet-ready lossless images is PNG. Its features are described above in the section Do you store line art for the web in
GIF format?
We have a program called SSW Code Auditor to check for this rule.
-
Do you make sure your website doesn't have duplicate images?
Image files are outside the realm of most database developers mind sets. So I've seen many very messy websites that have duplicate images all over the place. You only need an image in one place in your web site. The rule is that if it is used once, it goes in the associated directory - e.g. /ssw/Company/Images OR if it is used more than once, the image is moved to the root images directory - e.g. /ssw/Images. One of benefits of avoiding duplicate images is speed up web surfing for your users.
-
Do you prefix your images appropriately?
It is important to sensibly name your images. We don't use "img" (in the same way we don't use "tbl" for tables).
However, for special types of images we do include a prefix.
| Image Type |
Prefix |
Example |
| Banner |
ban |
banSSW.gif |
| Icon |
ico |
icoSSW.ico |
| Screenshot |
Screen |
ScreenCodeAuditorMainWindow.gif |

- Figure: Correctly named images
-
Do you add width and height properties to images in user controls?
Framework pages (i.e., user controls and common layout files) will have width and height properties specified for all images
that are used. This means that the page's layout will be rendered correctly while loading and when the user has images turned off in their browser.
<img src="TopBar_Row1_Col2.gif" width="86" height="20" />
- Figure: Good - User controls contains width and height properties
<img src="TopBar_Row1_Col2.gif" />
- Figure: Bad - User controls does not contain width and height properties
We have a program called SSW Code Auditor to check for this rule.
-
Do you exclude width and height properties from image references in content?
In the case of content (unlike a site's framework files), specifying the width and height
properties for images on your web pages can sometimes turn out to be more trouble than it's worth, particularly if the image is likely to
be changed a few times.
As a result, we have made a rule that content pages will not have the image dimensions specified in HTML.
We do have one exception to this rule: any HTML content that is to be sent out via email, as Outlook blocks images by default and
renders them as placeholders with very lengthy alternate text. As a result, the page is invariably stretched to widths that make the
contents of the message somewhat unreadable.
<img src="MyPic.gif">
- Figure: Good - Exclude width and height properties for content images
<img src="MyPic.gif" width="93" height="25">
- Figure: Bad - Including the width and height properties for content images
We have a program called SSW Code Auditor to check for this rule.
-
Where do you store your favicon.ico file?
A Favicon is a small image file included on nearly all professional
developed sites. The Favicon reflects the look and feel of the web site
or the organizations logo.

- Figure: Good Example - Using the favicon gives your website a very professional look and feel.

- Figure: Bad Example
Internet Explorer ("IE") 5.0 and above has a function that, if someone
bookmarks the page, It will look for favicon.ico from the directory of
the web page, if not found it will look for it from the root directory
of the website. Otherwise it will use the default Icon.
To implement the favicon:
- Copy your company's .ico icon to the root of the site and rename
it to favicon.ico
- Add the yellow code between the <HEAD>
tags in your MasterPage.master (or regular HTML/ASPX page)
Note: If you put the icon with the default file name of favicon.ico in the root directory of your domain, you don't need to add the following code. Because each time your Web page is added to a user's favorites, Internet Explorer automatically searches for this file from the root directory and places the icon next to all the favorites and quick links originating from your site.
|
<head runat="server">
<title>Coogee Australia - Self catering self contained holiday
accommodation, water views, close to beach</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<link href="http://www.ssw.com.au/ssw/Include/ssw.css" type="text/css"
rel="stylesheet">
<link rel="shortcut icon"
href="/images/favicon.ico" type="image/x-icon" />
</head>
|
Figure: One line of HTML lets you add your company's icon to
your web page
For more information about the shortcut icon, check out msdn.microsoft.com
We have a program called SSW Code Auditor to check for this rule.