Is there any authoritative information on the web concerning which HTML element to chose for an advertisement banner?
I considered <article>
or <aside>
, but I think more appropriate is simply: <div class="ad">
Is there any authoritative information on the web concerning which HTML element to chose for an advertisement banner?
I considered <article>
or <aside>
, but I think more appropriate is simply: <div class="ad">
In most cases I'd use the
aside
element:As the
aside
element is a sectioning element, it creates an entry in the document outline, even if you don't use a heading explicitly. In most cases this would be what you want.If you don't host the ad yourself, you might want to include it in
iframe
:(Where appropriate use the
sandbox
attribute for security.)So, a simple blog post page could be structured like:
The page has the following outline:
No, there is no HTML element defined to mean advertisement banner. In HTML5,
<aside>
means “tangentially related” content, which is quite different, and<article>
is even more different. Whether you use<div class="ad">
or something else depends on what you expect to achieve. There is normally no reason to use any specific markup for ads.