![]() |
WEB DESIGN SKILLSModule Study Guide
|
When composing a web page, particularly in raw HTML, you want to know whether the page will work properly when your viewers look at it on the web. The easiest way to do this, of course, is to stick it into a browser and see what it looks like. Unfortunately, this is not the whole story. Just because your web page looks fine in one browser, it does not mean it will work in others. Even different versions of the same browser may give different results. Some browsers will allow and display HTML pages which are actually 'incorrect' (e.g. have opening tags with missing end tags) by making an educated guess as to what the code should have been. This is a good thing if you are just using the browser for looking at other people's pages, but if you are developing your own, it can mask the fact that you may have some serious technical problems.
Validation is a way of checking the syntax of your web page against a universal 'standard' that should tell you whether or not your page is correct (i.e. 'valid') HTML. Note that this is just checking the technical aspects of the page - it won't tell you whether the page looks any good, or even whether it will display at all!
The Worldwide Web Consortium run a free service for checking your web page, which will give you results within a few seconds telling you if your page is 'valid'. You can either check pages which have already been put on the web, by telling them the full URL, or you can simply locate the file on your machine and upload it to them. Whichever way you choose, you get the results back in a matter of moments.
Find the validator at: http://validator.w3.org
If your page is already on the web, use the 'validate by URL' box to enter the URL, then click 'Check'. (You can also use this to check other web pages, to see how good other designers are at sticking to the standard!) If your page is still on your machine only, use the 'Validate by File Upload' box to choose the file you want to check, then click 'Check '.
[Note: There does seem to be an issue with uploading files using some versions of Internet Explorer. If you can't get any sensible results this way, either put the file up on a web server somewhere and try that way, or use a different browser.]
At the top of every valid web page, in the HTML code, you will find a line such as:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The reason for this line is that there are a number of versions of HTML and its successor, XHTML, in existence, and the validator (and browsers) need to know which one you are using. The doctype line above is the one used for XHTML 1.0. Others can be found at www.w3.org/QA/2002/04/valid-dtd-list.html
When you validate your page, you get some feedback from the validation service. If the page was valid HTML, it will tell you so, and give you a piece of code which you can add to the bottom of your page to tell others that you have successfully validated the page. If the code is not valid, you will get some clues as to what you can do to correct it. Sometimes these clues are not easy to interpret. Some of the most common problems are listed below:
</h1> in this case). The
feedback tells you in which line and column the error occurred, but beware
- when something is omitted the validator can only guess at where it should
have been; it might not be right! This error can also occur if nested tags
are closed in the wrong order e.g. <em><strong>emphasised
strong text</em></strong> <hbi>). If you are
programming in HTML code directly, this is probably a simple typing error.<img> tags are required to
have an "alt" attribute to define the text which will
appear if the image does not show.<li>)
which has not appeared.Sometimes a single mistake can trigger a whole series of errors in the feedback. If you do not understand some of the feedback, try correcting the errors you do understand and then revalidate. You may find that the others have disappeared anyway.
Accessibility is the term used generally to describe how useable ('accessible') various services are to disabled people. It applies not only to web pages, but also to shops, banking services, libraries, buses and so on. Since the recent Disability Discrimination Act in the UK (1995, 2005. See http://www.opsi.gov.uk/acts/acts2005/20050013.htm) there is a requirement for designers of public web sites to improve accessibility wherever possible. Of course, there are many types of disability, and their requirements are not always the same. On the other hand, some of the recommendations for improving accessibility can also benefit non-disabled users, as we shall see.
Again, the Worldwide Web Consortium are at the forefront of developments in this area, and although they are principally an American organisation, and so subject to different legislation, the principles for access to web pages are transferable. Much of the material on this page is derived from their pages under the Web Accessibility Initiative (see http://www.w3.org/WAI).
The inability to distinguish between various colours affects about 7% of males and 0.4% of females (http://www.hhmi.org/senses/b130.html). Red/green blindness is the most common, but there are other forms.
To make your pages readable by viewers suffering from colour blindness:
(Also applies to users with various other motor control difficulties.) Many users have problems using a mouse, and prefer to operate with either standard or specially adapted keyboards. Using the 'accesskey' attribute it is possible to allow users to focus on key links or 'form' elements by using the keyboard. (See http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-accesskey for an example.)
This is obviously one of the most difficult disabilities to cater for. Blind computer users use a variety of technologies to allow them to interact with their machine. One of the principal methods is to employ a screen reader, which will read out to them the text from a web page. As a designer, you can help screen readers to work better by:
<th> tag.alt' text for each image.<acronym> or <abbr> tags. (And other similar disabilities). Seriously dyslexic users also use text-to-speech software, so many of the techniques applicable to blind users also apply here. Dyslexic users are also distracted by on-screen movement, so keep animations to a minimum (i.e. don't use animated GIFs gratuitously) . In the future, browsers may include the ability to turn off or freeze animated content.
Strategies for dealing with these users include:
This covers a very wide range of disorders, but in general you can help users by: