Skip to content

Instantly share code, notes, and snippets.

@s2k
Last active February 9, 2022 11:28
Show Gist options
  • Save s2k/8e54698e01bf21581357093a4519cd54 to your computer and use it in GitHub Desktop.
Save s2k/8e54698e01bf21581357093a4519cd54 to your computer and use it in GitHub Desktop.
<!DOCTYPE html >
<html lang="en">
<head>
<title>Demo</title>
</head>
<body>
<h1>Whatever</h1>
<p>
<ol>
<li>
<a href="https://example.com">example.com</a>
</li>
</ol>
</p>
</body>
</html>
@s2k
Copy link
Author

s2k commented Feb 8, 2022

Validating this via, say, https://validator.w3.org/nu/#textarea yields an error:

Error: No p element in scope but a p end tag seen.
[From line 14, column 3; to line 14, column 6](https://validator.w3.org/nu/#l14c6)
  </ol>↩  </p>↩</body>…

But … why?!? The opening p tag is clearly there, isn't it.
When I remove the list, then the error goes away… 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment