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

Gdatamart.com

GDM provides information across a wide range of categories by verifying data from multiple official sources, even though the site is still being developed.

© 2025 GDATAMART.COM (All Rights Reserved)