I can't validate my site - aarrrgghhh

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Can someone PLEASE tell me where I'm going wrong. I've stared at this
page for 2 hours and still can't get it to validate on
http://validator.w3.org/check .

Page URL : http://www.coffeemachine.com.au

Offending Header section:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd ">
<html dir="LTR" lang="en">
  <title>Coffee Machines</title>
  <meta name="description" content="Sales of coffee machines and
accessories. Top quality coffee machine brands including Saeco and
Jura. Free delivery of coffee machines to most of Australia." />
  <meta name="keywords" content="coffee machine, coffee machines,
espresso machine, coffee" />
 <meta http-equiv="Content-Type" content="text/html;
<!-- EOF: Generated Meta Tags -->

<META name="netinsert" content="" />
<base href="http://coffeemachine.com.au /" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />

I can't see missing quotes or unclosed tags. Am I going mad?????



Re: I can't validate my site - aarrrgghhh

jrstorey@hotmail.com says...
Quoted text here. Click to load it
You have 14 errors, not just your problems at the top.  You are not
using XHTML, so do not close your tags with"/"

That's your problem.  Stop using XHTML syntax with an HTML document.

And fix all the other errors.

Re: I can't validate my site - aarrrgghhh

In our last episode,
the lovely and talented Jim
broadcast on comp.infosystems.www.authoring.html:

Quoted text here. Click to load it

You used /> to close META, but you have declared HTML 4.01.
If you had read what the validator said in verbose mode, you would know this
causes the inference that you have closed the head section.  Thus the next
META is in the body, etc.

There is a kind of HTML that is intended to be XML compatible.  It is XHTML.
If that is what you want to do, then declare XHMTL and stick to it.

Quoted text here. Click to load it

Lars Eighner         usenet@larseighner.com         http://www.larseighner.com /
    Nine out of ten doctors agree that one out of ten doctors is an idiot.

Re: I can't validate my site - aarrrgghhh

Jim wrote:
Quoted text here. Click to load it

The first line of your document says that it's an HTML document. Then
you use syntax that isn't valid in HTML documents, only in XHTML
documents. The validator explains the exact problem to you. It would
have been nice if you'd included it (a) to save us the trouble of
running the validation ourselves and (b) to indicate that you'd at least
read it and to enable to you tell us what part you didn't understand.

For your page, the validator says, after flagging the META tag *and
highlighting the slash at the end*,

...One common cause for this error is the use of XHTML syntax in HTML
documents. Due to HTML's rules of implicitly closed elements, this error
can create cascading effects. For instance, using XHTML's "self-closing"
tags for "meta" and "link" in the "head" section of a HTML document may
cause the parser to infer the end of the "head" section and the
beginning of the "body" section (where "link" and "meta" are not
allowed; hence the reported error).

In other words: lose the slash.

Re: I can't validate my site - aarrrgghhh

Harlan Messinger wrote:
Quoted text here. Click to load it

Or keep the slash if your file is being generated automatically by an
XML-based application, but then just accept that your file won't
validate unless you override the DOCTYPE and tell the validator to use
the XHTML rules.

Re: I can't validate my site - aarrrgghhh

Thank you all for clearing up this confusion over the difference in
closing tags in HTML and XHTML.

Site Timeline