Forum Moderators: open

Message Too Old, No Replies

w3 Validator on crack?

Telling me I need to close a P when it's closed!

         

JAB Creations

8:00 pm on Oct 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Has anyone else had issues with the w3 validator? It's telling me I have to close my paragraph...umm, it's closed! Here is an example...and oddly it does this only once PER page.


<p>An excellent Trance like track with many good synth instruments.
&nbsp; Be sure to also check out his Jenova Remix on his site.</p>

Now call me crazy, but I think I lcosed that tag!

iamlost

8:09 pm on Oct 23, 2004 (gmt 0)

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



A parser will sometimes give misleading answers - look for a missing or an extra tag elsewhere in the code, usually prior to the one mentioned.

It is only a computer program you know. Fortunately we humans are still necessary. And if we continue to write buggy code always will be. I knew there was logic to my mistakes.

jo1ene

11:37 pm on Oct 23, 2004 (gmt 0)

10+ Year Member



As any programmer knows, the error stated isn't necessarily the actual mistake made. That's just where the debugger/validator noticed.

g1smd

8:11 am on Oct 24, 2004 (gmt 0)

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



You probably have a nesting error a little further up the page. The validator tries to keep a count of nested tags, and when the count gets out of sync with what is on your page it throws an error message. The error message can be a couple of lines away from the root cause of the problem sometimes.

Use this link: [validator.w3.org ] and tick the options for Show Outline and Show Source, and PM me the URL of the validator results along with the URL of this thread so that I can find it again, and I'll see if I can spot the error.

StupidScript

4:22 pm on Oct 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



g1smd is right. It's very important to nest properly. And don't think you're being punished ... it's a good thing!

A tiny nesting issue in the first few lines can cause a hundred warnings in the validator. When the first snafu is corrected, the rest of the warnings could disappear.

Correct the first error, and revalidate. Correct the next first error, and revalidate. Soon, you're clean.

This is an example of an "error":

<p align="center">
<b><font color="red">New Stuff!</b></font>
</p>

(Should be <b><font ..> ... </font></b>) That'll screw up the rest of the validation and generate the warning you first described.

Use the validator to help you get your code ready for the other programs that will be reading it, and you'll be relieved at how much more secure you become in your next code warrior adventures.

JAB Creations

9:36 pm on Oct 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually this was the only xhtml strict error the parser had left to point out...


<p>An excellent Trance like track with many good synth instruments.
&nbsp; Be sure to also check out his Jenova Remix on his site.</p>

I'm mostly going through to take out any errors that may have lasted the past two since I stopped using an editor from which I learned how to start all this from.

So if this is my only error, then how come it's an error?

tedster

9:54 pm on Oct 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try removing that paragraph (temporarily) and validate the page again. Something else will probably show as an error then. That will give you more of a clue where the "root cause" of the error message lies.

As others said above, the mistake which is causing the parser to generate an error message is probably earlier on the page.