- From: Philip TAYLOR (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
- Date: Fri, 23 Sep 2011 16:32:53 +0100
- To: Joe Java <cop3252@yahoo.com>
- CC: "www-validator@w3.org" <www-validator@w3.org>
Joe Java wrote: > Then the error message is bad and should state > that a UL tag may not be within a P tag. You are confusing tags and elements. A <UL> tag may follow an unclosed <P> tag, and will have the side effect of closing the <P> element that the <P> tag opened. Thus the <UL> /element/ is not within the <P> element; rather, it follows the <P> element. If a closing </P> tag is then found once the <UL> element is closed, and if there is no intervening opening <P> tag, then the closing </P> tag will represent a syntax error and the validator will complain accordingly. > > > Why is test2.html [1] a valid HTML5 document? Because (see above) the <UL> tag has the side-effect of closing the <P> element; it then starts a <UL> element which is later properly closed; and finally the opening <P> tag that follows starts a new <P> element that is then closed by the closing </P> tag that follows. Philip Taylor -------- [1] https://eyeasme.com/Joe/test2.html
Received on Friday, 23 September 2011 15:33:36 UTC