TOP CATEGORIES

×

Does HTML allow nested links?

A

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>

</a>

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

0 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2025 GDATAMART.COM (All Rights Reserved)