Forum Moderators: open

Message Too Old, No Replies

Trying to validate a page, HTML 4.01 Transitional...

Getting some crazy error.

         

edit_g

1:24 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok - I'm using the W3C validator to try to validate a page as valid HTML 4.01 Transitional.

Im getting this error:

Line 67, column 17: document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

<p class="white">Blah blah blah blah blah</p>

I don't see the problem with this - but maybe I'm being stupid. Any ideas?

<edited> that didn't come out right..

eric258

1:30 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



p is probably inside of another element, such as a <li> or <ul> element.

Just my first guess.

eric258

1:31 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



By the by, "white" is not really a great structural indicator of the type of paragraph it is. try "story" or "copyright" or "note" or something that better indicates its function. color can change in the future, and you don't want to have to change all your code from class="white" to class='blue".

ebs

edit_g

1:34 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



p is probably inside of another element, such as a <li> or <ul> element.

Nope - the only thing it is inside is a div - and it's closed up.

By the by, "white" is not really a great structural indicator of the type of paragraph it is. try "story" or "copyright" or "note" or something that better indicates its function. color can change in the future, and you don't want to have to change all your code from class="white" to class='blue".

Good call, thanks. :)

universalis

2:22 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



Line 67, column 17: document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

I'm guessing, but you may find that the problem is just before this line - perhaps an unclosed element like a div, p, ul or whatever.

PS. If there is a mod reading, this thread should be moved to the HTML and Browsers forum ;)

g1smd

11:49 pm on Jun 18, 2003 (gmt 0)

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



I usually find that error is with <font> tags, or other inline elements that are outside of the block level element you mentioned.

Post the three or four lines of code around the error. It should be obvious what the error is from that.

papabaer

12:01 am on Jun 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You know, it's never a bad idea, that, while you are in the vicinity of the W3.org Validator, to stop by the W3C HyperText Markup Language (HTML) Home Page [w3.org] and read a little bit.

Studying the specs, along with using the W3 validator, will only improve your skills.