Re: Error Message Feedback

Thankyou for the reply. I was using that code so that I could have a space 
between each div (as I had more than one div after another) and the only way 
practical I could think of doing this was by seperating them via <p> tags. I 
found a fix however, which includes changing the margins of the div's:

div {
margin: 7px 2px 7px 2px;
}

This produced the desired results (a "line break" between each div) and the 
<p> has now been completely removed. However, as you (Jukka) have said, my 
<br /> tag is there to serve a similiar purpose: I need a line break there. 
I tried <p> tags before but it generated too much of a break, all I need is 
one break, instead of a paragraph break. Would you suggest using <br> 
instead of <br /> as I have identified the document as HTML 4.01 
Transitional and not XHTML?

This has been CC'ed to www-validator@w3.org to be put on their logs if 
wanted as a resolution to the problem originally encountered.


>From: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
>To: Seguer of the Void <seguer_au@hotmail.com>
>CC: www-validator@w3.org
>Subject: Re: Error Message Feedback
>Date: Sun, 19 Sep 2004 21:19:14 +0300 (EEST)
>
>On Sun, 19 Sep 2004, Seguer of the Void wrote:
>
> > Line 95, column 5: end tag for element "P" which is not open
>- -
> > <p>
> > <div class="stats">
> > 	<a class="header">Total: </a><a>34</a><br />
> > 	<a class="header">Allows: </a><a>30</a><br />
> > 	<a class="header">Blocks: </a><a>4</a><br />
> > </div>
> > </p>
>
>By HTML syntax, a <p> element may contain only text-level (inline)
>elements, not block elements like <div>. Thus, when validating against
>HTML 4.01 document type, a validator implies, by HTML rules, an end tag
></p> when a <p> element has been opened but not closed and a <div> tag is
>encountered. That is, <div> implicitly terminates an open <p> element.
>And this makes the </p> tag homeless.
>
>On the other hand, getting this message suggests that you are validating
>against HTML 4.01 (or something similar), but you are using <br /> as in
>XHTML. Although this mostly works on browsers, it tends to cause problems
>in validation in many situations.
>
>If you used an XHTML doctype, then the validator would report a missing
></p> tag when it encounters the <div> tag, since in XHTML no end tag
>omission is allowed.
>
>(I don't mean you should use XHTML; actually I think nobody should use
>XHTML unless he really knows what he is doing _and_ has a practical reason
>to use XHTML. But my main point is that mixing old HTML and XHTML in the
>same document will lead you into confusion, sooner or later.)
>
>--
>Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
>

_________________________________________________________________
FREE* Month of Movies with FOXTEL Digital:   
http://adsfac.net/link.asp?cc=FXT002.7542.0

Received on Sunday, 19 September 2004 21:57:05 UTC