Prepare for Angular Interviews with real-life questions. Utilize quizzes and examples to deepen understanding and enhance your skills. Gear up to ace your interview!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which of the following statements is true about HTML attributes?

  1. HTML attributes are case-sensitive

  2. HTML attributes can only be strings

  3. HTML attributes do not have a direct mapping

  4. HTML attributes are not case-sensitive

The correct answer is: HTML attributes are not case-sensitive

HTML attributes are not case-sensitive, which means that regardless of how you format the attribute names in your HTML code—be it uppercase, lowercase, or a mix of both—the browser will recognize them the same way. For example, `id`, `Id`, and `ID` are interpreted identically by the browser. This is a standard across HTML specifications, making it easier for developers to maintain and read code since they do not have to worry about the casing of attribute names. The other statements do not hold true under HTML specifications. For instance, while some characteristics of values may suggest certain types (like a string), HTML itself allows various contexts for attributes, and they are primarily handled as strings in HTML syntax. Furthermore, all attributes do have a clear mapping to their respective properties in the Document Object Model (DOM). Thus, understanding the case insensitivity of HTML attributes is vital for effective web development.