Skip Navigation LinksHome > SSW Standards > SSW Rules > Rules To Better Websites - Graphics

What others have to say about us
See what people think about this product I've been putting together Development Guidelines for my employer and in the process have reviewed many published standards (in the .Net arena) from around the world. In each category, the suggestions at SSW are always among the best. See what people think about this product
- Leon Bambrick,
 

Do you agree with them all? Are we missing some? Let us know what you think.

  1. 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
  2. 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.

    Bad Example - Using JPG for line art
    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
    Good Example - Using Gif for line art
    Figure: Good Example - the same graphic, saved as a GIF, is 2.75kB with much cleaner shapes.
    Bad Screenshot using JPG
    Figure: Bad Screenshot Example - this JPEG is 35kB.
    Good Screenshot using GIF
    Figure: Good Screenshot Example - the same screenshot saved as a GIF has cleaner edges and is only 17kB.

    When should 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.

  3. Do you store photographs for the web in JPEG format?

    In line with the statement above, all photographs should 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.

    gif Vs jpg
    Figure: Bad Example - this photo should 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
    gif Vs jpg
    Figure: Good Example - the same graphic, saved as a JPEG, is 4.4kB.
  4. 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:

    1. Drop shadow
    2. 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 Leave Site and drop shadows in Photoshop Leave Site.

  5. 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.

  6. 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.

  7. 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.

  8. 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
  9. Do you add width and height properties to images in user controls?

    Framework pages (i.e., user controls and common layout files) should 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.

  10. 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 should 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.

  11. 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:

    1. Copy your company's .ico icon to the root of the site and rename it to favicon.ico
    2. 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 You are going to a site outside of SSW

     

    We have a program called SSW Code Auditor to check for this rule.

    We have a program called SSW Link Auditor to check for this rule. We offer a rule sample page for demo scan.
  12. Do you know not to include toolbar and taskbar junk in screenshots?

    Screenshots are a very important part of websites these days. Be careful to avoid unnecessary toolbars and taskbars in screen shots.

    bad example as the taskbar and the google toolbar have been captured
    Figure: Bad example as the taskbar and the google toolbar have been captured
    Good example  the taskbar and google toolbar have been hidden before capturing the screenshot
    Figure: Good example - the taskbar and google toolbar have been hidden before capturing the screenshot

    Tips:

    1. Use a region screen shot if appropriate (however the URL is generally helpful in most browser screen shots)
    2. Go full screen eg. F11 in Internet Explorer, then <Alt>+<Print>
    3. Always have the 'Auto-hide the taskbar' option checked
      Set toolbars to auto-hide
      Figure: Always have the 'Auto-hide the taskbar' option checked so you do be screen shots
    4. Do you use image sprites to reduce HTTP requests?

      A sprite is an image that has all of your other images inside of it, so if your sprite has 5 images, you are getting rid of 4 HTTP requests and speeding your site’s loading time up by the time for each of those 4 requests?latency. You will use CSS selectors for each link to display only a portion of the image sprite - effectively showing just the image you need. To use CSS image sprite means:

      • to save bandwidth
      • to reduce HTTP server requests
      • and thus speed up page load times

      insert picture

      Figure: Good example - one image contains all the icons

      insert picture

      Figure: Bad example - one image for each icon:


Acknowledgements

Adam Cogan
Joe Hardy
Daniel Hyles


Benefit from our knowledge and experience!

SSW is the industry leader in Custom Software Development, Software Auditing & Developer Training.

Call us on +61 2 9953 3000 or email us for a free consultation

What does it cost? I’m not in Australia. Can you still help?