- From: Jukka K. Korpela <jukkakk@gmail.com>
- Date: Tue, 18 Jan 2022 12:45:33 +0200
- To: ottahe@posteo.de
- Cc: W3C WWW Validator <www-validator@w3.org>
Received on Tuesday, 18 January 2022 10:45:57 UTC
ottahe (ottahe@posteo.de) wrote: > > I have such a construct in a html page, the result is shown as expected. > The validator says: > > Error: No p element in scope but a p end tag seen. > From line 256, column 34; to line 256, column 37 > on"></pre></p>↩ > > Do I need to change my code? > Yes, you need to remove the nesting of a <pre> element inside a <p> element, in <p><pre id="da-json"></pre></p> The <pre> element is a block element and not allowed inside a <p> element, which may contain text and text-level markup only. The simplest fix is to remove the tags <p> and </p>. This may affect the rendering, since now there is an empty <p> element (implicitly closed by the <pre> tag) before the <pre> element, and this may cause some vertical spacing in some browsers. Use CSS margin properties to set the desired spacing. Yucca, https://jkorpela.fi > >
Received on Tuesday, 18 January 2022 10:45:57 UTC