If I had a link to another page, and another link was put inside it, would that be ok to do? Is it allowed in HTML5 and if so, which browsers support it?
Trying this in Chrome 14.0.835.202, I see the text on the left gets linked, followed by the #1
link, but the rest doesn't get linked.
Example:
<p> <a href="download?file=2">Example file.txt</a> [ <a href="revision?file=2&id=8">This is an example revision that fixes bug <a href="bug?file=2&id=1">#1</a>. Version number updated. </a> ] </p>
You can't. It is explicitly forbidden by the HTML specification.
The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g. buttons or other links).
According to the W3C specification for links HTML5: No.
Content model:
Transparent, but there must be no interactive content descendant.
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