I have the following markup:
<footer>
<p id="foo">
©Copyright. <address><a href="" title="Web Development">Me</a></address>. Todos os direitos reservados.
</p>
</footer>
But W3 Validator (HTML 5) says:
Error Line 81, Column 20: No p element in scope but a p end tag seen.
</p>
I do have a p tag. What's wrong? Thank you.
Problem:
<p>
cannot contain an<address>
block
You can nest a <p>
inside an <address>
! An <address>
block just means that there's address information to be found within it. It does not need to be wrapped tightly around the address itself.
http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-address-element
The Layout-Problem:
why use a wrapper like 'p or 'div for the layout coding anyway? as a block-level element you can use 'adress directly as your container-box and format it with any css as you like. keep code minimal and simple.
The Semantic-Problem:
also you dont need a wrapping 'p for the semantics, as 'adress explains its contents already very well. just use it ;-)
The Syntax-Problem:
and yes, other answers are right: 'p contains legally only inline-/inline-block-elements, no block-level-elements allowed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With