ethical-ad-client
ethical-ad-client copied to clipboard
Prefer span over div for the default template
The following HTML structure is invalid: p > div, the following is valid: p > span.
I don't believe we output any <p> elements in our placements. Are you noticing otherwise, or is the case that you are surrounding the <div> in a <p> on your site?
We currently treat both text and image placements as a block elements anyways -- and both have nested block elements -- so a <div> is still probably the most semantically correct. If it's possible, it's probably best to just avoid the surrounding <p> element.
@agjohnson To provide more context on the problem, we render the ad on a p element, it's a constraint we can't change. I was leaning toward using the API raw, but it throws a CORS issue.