Forum Moderators: open

Message Too Old, No Replies

W3C Validation

         

terrybarnes

7:41 pm on Nov 13, 2008 (gmt 0)

10+ Year Member



Hi, I'm trying to get my site to appear with no errors and no warnings but not yet successful. The following are causing problems:

Line 17, Column 160: unclosed start-tag requires SHORTTAG YES.

…Consultancy" width="260" height="79" </a></div>

The construct <foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.

and this:

Line 154, Column 67: there is no attribute "LANGUAGE".

…ma"></div><script type="text/javascript" language="Javascript">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

And this:

Line 52, Column 57: there is no attribute "ONLOAD".

<div id="toggle_appear" style="display:none;" onload="Effect.hide(this);">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

Any ideas of how to get resolve these would be much appreciated. I'm trying to use the Strict DocType on all pages.

Fotiman

7:55 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



1. What does like 17 contain? It looks like you might have something like <a ... </a> instead of <a ...></a>

2. Just as the validator says, there is no attribute "LANGUAGE" on the script tag. Many people incorrectly include it, but it doesn't belong there. So your script tag should be:
<script type="text/javascript">

3. Just as the validator says, there is no attribute "ONLOAD" for div elements. There is an onload for body, though.

[edited by: Fotiman at 7:56 pm (utc) on Nov. 13, 2008]

terrybarnes

8:52 pm on Nov 13, 2008 (gmt 0)

10+ Year Member



Thanks so much for your reply.

1. Yes, you're correct I forgot to include the > character.
2. I've now removed that tag
3. Again, I've remove that

All appears to be passing through Strict Validation - just need to run a few tests tomorrow in different browsers but all being well the big launch will be tomorrow... Thanks again for your help.

g1smd

10:10 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



One useful tool that can also be used is the HTML Validator extension for Firefox.

It shows a green tick mark at the bottom right of all pages that have problem-free code. If there are problems, then you get a yellow exclamation mark or red cross. Clicking that, will bring up a window listing all the problems and suggested fixes.

It is very useful in rapidly checking many pages of a site in a short time.

terrybarnes

10:47 pm on Nov 13, 2008 (gmt 0)

10+ Year Member



Great, thanks for this - I've just downloaded and had a quick play with this one: [addons.mozilla.org...] and it looks really good - that'll definitely help me with future sites.

[edited by: eelixduppy at 5:10 pm (utc) on Nov. 14, 2008]
[edit reason] switched URLs [/edit]

g1smd

11:05 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's the one. Official page at:

[addons.mozilla.org...]

On the day a site goes live I try to click round as many pages as possible and make sure they all have no errors.

terrybarnes

11:12 pm on Nov 13, 2008 (gmt 0)

10+ Year Member



Luckily the site I'm currently developing only has 6 pages so it's easy to sort out any issues that exist (often with the very much appreciated help of people on forums like this).