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