W3C home > Mailing lists > Public > www-validator@w3.org > July 2016

Re: Error: No p element in scope but a p end tag seen.

From: Philip Taylor <P.Taylor@Rhul.Ac.Uk>
Date: Tue, 5 Jul 2016 09:53:43 +0100
To: Ben Butler <ben@animatedzombie.com>
CC: "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <577B7597.9060401@Rhul.Ac.Uk>
It is highly likely (but I can't be bothered to check the specification) that a <ul> is not allowed inside a <p>.  If that is the case, then the first occurrence of an opening  <ul> tag within a <p> element will close the <p> element (silently) and thus there will be no <p> element in scope when the </p> is encountered.

Philip Taylor
--------
Ben Butler wrote:
> Hi,
> I received this error in the html validator, but the html does contain a <p> tag at the beginning:
>  
> *Error*: No |p| element in scope but a |p| end tag seen.
>
> From line 27, column 572; to line 27, column 575
>
> |continue.*</p>*↩ |
>
>  
> Perhaps there is an error in the parser or you may have an explanation for me. Here is the html extract that is failing:
>  
> <div class="text">
>                             <p>Refer to section 5 for a full list of numbers and contacts you could use (such as Lifeline) when asked <i>Who would I talk to?</i> Review this checklist:<ul><li>Express your concerns</li><li>Be calm and supportive</li><li>Ask open-ended questions</li><li>Be open, make eye contact, use relaxed body language</li><li>Summarise</li><li>Treat problems seriously</li><li>Thank and acknowledge courage</li><li>Refer to Lifeline 13 11 14</li></ul>Remember: Starting a conversation can save someone's life.<br/><br/>Select <b>Next</b> to continue.</p>
>                         </div>
>  
> Cheers,
> Ben

-- 

Philip Taylor
Received on Tuesday, 5 July 2016 08:54:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 5 July 2016 08:54:29 UTC