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

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