Attribute Name Case Sensitive

Q

Is Attribute Name Case Sensitive?

✍: FYIcenter.com

A

Yes, XHTML attribute names are case sensitive. You must write all attribute names in lower case letters.

Here are some valid and invalid attribute names:

  • <a href="http://dev.fyicenter.com"> - Valid attribute name.
  • <a HREF="http://dev.fyicenter.com"> - Invalid attribute name, must use lower case letters.
  • <script Type="text/javascript"> - Invalid attribute name, must use lower case letters.

Note to HTML document authors: HTML element attribute names are not case sensitive. But XHTML element attribute names are case sensitive. If you are converting existing HTML documents to XHTML documents, you will get a lots of syntax errors about upper case letters used in HTML attributes.

 

Quoting HTML Element Attribute Values

Writing HTML Element Attributes

HTML Tag and Attribute Syntax

⇑⇑ HTML Tutorials

2023-09-23, 1408🔥, 0💬