Does HTML allow nested links?

Asked: Minakshi Jha


Anurag Mishra

No, HTML does not allow nested links, Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements. 

Since the DTD defines the LINK element to be empty, LINK elements may not be nested either.

See the below example, this is not allowed in HTML

<a href="#">

    <a href="#" >Link 1</a>

    <a href="#" >Link 2</a>


The above example is not valid, nested links are not allowed in HTML

0 votes

Your Answer

Email Us:

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)