ethical-ad-client icon indicating copy to clipboard operation
ethical-ad-client copied to clipboard

Prefer span over div for the default template

Open oliviertassinari opened this issue 5 years ago • 2 comments
trafficstars

The following HTML structure is invalid: p > div, the following is valid: p > span.

oliviertassinari avatar Jul 08 '20 22:07 oliviertassinari

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 avatar Jul 09 '20 00:07 agjohnson

@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.

oliviertassinari avatar Jul 09 '20 00:07 oliviertassinari