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: Ian Stuart <Ian.Stuart@ed.ac.uk>
Date: Tue, 5 Jul 2016 09:56:12 +0100
To: <www-validator@w3.org>
Message-ID: <50de0d09-17b6-52c1-1aef-369089348a2a@ed.ac.uk>


On 05/07/2016 06:22, 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>
>

<p> is a block element, and block elements cannot have other block 
elements nested inside them.

<ul> is also a block element, so can't be inside the <p>

Terminate the first half of the paragraph before the <ul>, then restart 
it after the </ul>


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Received on Tuesday, 5 July 2016 08:57:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 5 July 2016 08:58:05 UTC