W3C home > Mailing lists > Public > www-validator@w3.org > March 2005

Re: I am indesperate need of help

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 01 Apr 2005 00:59:38 +1000
Message-ID: <424C105A.6030105@lachy.id.au>
To: hg safds <introvertedboi@hotmail.com>

hg safds wrote:
> Here is my results.

It is *much more convenient* if you simply provide a URL for the 
document in question, rather than copying an entire results page into an 
e-mail.

Tip: Don't panic about having lots of errors, just focus on one at a time.

>       No Character Encoding Found! Falling back to UTF-8.

The character encoding for the document needs to be specified.  There 
are many to choose from and browsers should not need to guess which 
encoding was used.  You may need to consult the documentation for your 
editor to determine which encoding the files are being saved as, but 
this is commonly ISO-8859-1, US-ASCII or UTF-8.  Beware of editors that 
save as Windows-1252, even though they claim to use ANSI – they're lying.

http://www.w3.org/International/resource-index.html#charset

> So what should I do? Tell me more... 
> <http://validator.w3.org/docs/help.html#faq-charset>

The FAQ actually does provide some useful information, I assume you 
actually read it before you posted?

>       No DOCTYPE Found! Falling Back to HTML 4.01 Transitional

Use the correct DOCTYPE.

> So what should I do? Tell me more... 
> <http://validator.w3.org/docs/help.html#faq-doctype>

The FAQ provides more than enough information, but I'd recommend you use 
HTML 4.01 Strict or Transitional and start the document with this 
DOCTYPE.  Either of these (not both) should be the first thing in the 
file.  You need to pick the most appropriate for your needs.  If you are 
using deprectated features, you need to use transitional, although you 
should work to be able to use strict in the future.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
     "http://www.w3.org/TR/html4/loose.dtd">

Transitional is probably the most appropriate for your needs at the moment.

>       /Line 6, column 16/: there is no attribute "TOPMARGIN"
> 
>       |<body topmargin=*"*0" leftmargin="0" bottommargin="0" rightmargin="0">|

Those 4 margin attributes are non-standard, proprietary extensions. 
Remove them and use CSS instead:

body { margin: 0; }

That has exactly the same effect as those attributes.

>       /Line 8, column 22/: document type does not allow element "STYLE" here
> 
>       |<style type="text/css"*>*{ }|

Style elements belong within the <head>.  They cannot be used anywhere 
within the <body>.  Move this to the head like this.

<head>
   <title>Document Title</title>
   <style type="text/css">
     body { margin: 0; }
     /* Insert more CSS here */
   </style>
</head>

>       /Line 159, column 6/: end tag for element "HEAD" which is not open
> 
>       |</head*>*|

This often happens when you have used XHTML syntax for an empty element 
such as <link /> or <meta />.  In HTML, do not use the /, it has a 
different meaning in HTML from XHTML, which can cause this strange 
error.  I suspect this would also be the cause of the previous error 
with the style element.

eg. Instead of
<link rel="stylesheet" type="text/css" href="style.css" />
use
<link rel="stylesheet" type="text/css" href="style.css">

>       /Line 160, column 5/: document type does not allow element "BODY" here

This should get fixed by fixing the previous error.

>       /Line 163, column 62/: required attribute "ALT" not specified
> 
>       |...c="http://www.44caliberlove.com/images/toplayout1.jpeg"*>*|

Images must have alternate text which is used when the images are not 
available for some users for any reason.
http://www.hixie.ch/advocacy/alttext
http://www.hixie.ch/advocacy/alt-tooltips
http://www.htmlhelp.com/feature/art3.htm

>       /Line 166, column 110/: there is no attribute "ALLOWTRANSPARENCY"
> 
>       |...auto; z-index: 2;" allowtransparency=*"*true">|

That is a non-standard proprietary extension, and I don't even know what 
it's for.  Remove it.

>       /Line 234, column 7/: there is no attribute "BORDER"
> 
>       |border=*"*0" name="submit" alt="|

There is no border attribute for that element.  I suspect it's an input 
element, probably a type="image".  You could specify the border using CSS.

>       /Line 269, column 6/: end tag for element "FONT" which is not open
> 
>       |</font*>*</div>|

Remove all font elements!  There is absolutely no reason to continue 
using them, use CSS instead.  To fix this error though, simply remove 
the extraneous </font> end-tag.

>       /Line 272, column 116/: end tag for "DIV" omitted, but its declaration
>       does not permit this
> ...
>       /Line 272, column 0/: start tag was here
> 
>       |*<*div style="position:absolute; top:475; left:50; width:396px; overflow:
>       auto; z-|

You need to make sure the start- and end-tags for elements are balanced. 
  ie. For every start tag (<div>), you must have a matching end tag 
(</div>) unless it is an empty element.  Empty elements are <img>, <br>, 
<link>, <meta>, etc.  You must also make sure elements are nested correctly.

This is wrong because the elements are overlapping:

<x>
     <y>
     </x>
</y>

This is the correct way:
<x>
     <y>
     </y>
</x>

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Received on Thursday, 31 March 2005 14:59:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:18 GMT