Forum Moderators: open

Message Too Old, No Replies

Fixing Validation Errors

Is there a good resource for this?

         

stuntdubl

3:47 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am one error away from validating my first page!

I am using the xhtml transitional standard,
and I keep getting this error:

<style type="text/css">
^Error: element "style" not allowed here; check which elements this element may be contained within

Where are the resources to find out what these errors mean,
and can anyone help me get this stinkin' page validated?

korkus2000

3:54 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the element that the style element is contain within? What is the tag above and below your opening and closing style tag?

stuntdubl

5:56 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is located within the <body> tag......
It is right at the beginning of my document body.

korkus2000

6:02 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[w3.org...]
HTML permits any number of STYLE elements in the HEAD section of a document.

Needs to be in the head to validate.

g1smd

8:53 pm on Oct 2, 2002 (gmt 0)

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



It is nice to see that people are taking the time and trouble to validate their pages.

It's great to know that having written something that it should work on just about any browser, under any operating system, anywhere in the world, rather than taking a big chance that it might be visible to some visitors under certain conditions.

Of course, some XHTML pages with CSS do get messed up on Netscape 4 systems, whether or not they validate; but validation still gives it a better chance of working.

stuntdubl

9:22 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've heard xhtml is the best for pda type devices though, which really seem to be the wave of the future.

That did work well....too bad it was only for a simple entrance page....even still I was excited to have my first page validate. I have looked at some of my other pages, and they look GREAT in new browsers, but on NN4 they fall to pieces.

It is nice to have some backwards compatibility.

<added> By the way, thanks for the help Korkus....is there any good sites you know of to get hints/error explanations for validation?</added>

g1smd

9:45 pm on Oct 2, 2002 (gmt 0)

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



I just use [validator.w3.org...] but some of the error messages can be a bit cryptic at times; or the actual error may be some distance away from the perceived fault.

korkus2000

10:21 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I really only know of the www.w3c.org and the actual html specification. Other than that I think your best bet is right here.

tedster

10:34 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For further reference, we've been documenting common validation problems on this thread:

Common Validation Errors [webmasterworld.com]

keyplyr

6:14 am on Oct 3, 2002 (gmt 0)

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




The best is the W3C HTML Validator [validator.w3.org], but I agree with g1smd in that sometimes it's difficult to pin-point the origin of what causes the error. Another respected resource which offers a free download for your desktop is the CSE HTML Validator. [htmlvalidator.com]