Putting an anchor a
around a complex div
, or a container, containing more buttons and other anchors is not something valid.
What's the correct, valid, way to follow if I want this container to behave as a link to another element?
code sample:
<div class="my-container-where-i-would-like-a-link" data-href="/something">
...
<a href="/something/else">a children link</a>
</div>
Right now I am considering to implement it in JavaScript, I was wondering if there were any better option.
EDIT: Please also consider how SEO unfriendly is using JavaScript to do this.