TOP CATEGORIES

×

Do HTML IDs have to be unique?

A

Anurag Mishra

Yes, HTML ID must be unique in an HTML page. HTML does not allow duplicate id. There are a few reasons we need to understand. First of all, we need to know why id in HTML? Id is used to uniquely identify an HTML element so two-element can not have the same identity. 

Note - We can have the duplicate class name but id must be unique

0 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)