My HTML is as as below. I have opened all elements and closed them. Still when I check it on w3c it shows error. I cant figure it out.
That's because you are nesting a block level element inside the p
tag which is invalid. You can only nest inline elements such as span
, a
and img
inside p
tag. So your markup is invalid, consider making something like
to provide a drive-in services.
to provide a drive-in services.
From W3C[1] :
The P element represents a paragraph. It cannot contain block-level elements (including P itself).
1 - Reference