Should the <img>
tag be wrapped in a <p> tag or can it be just used without a <p> tag?
<img>
is an inline element and as such needs to be placed inside a block level element to validate.
Something like a <p>
, <div>
, <h1>
, or a <li>
would suffice.
Inline elements cannot be placed directly inside the body element; they must be wholly nested within block-level elements.
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