View video tutorial

HTML Case-Insensitive

HTML

HTML is case insensitive.

HTML case sensitivity.


HTML is not case sensitive.

Lower case or Upper case has the same meaning to the interpreter.

Using small letter is the best practice.

Using small letter and Capital letter together is a bad practice.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Best practice

HTML tag names and attribute names are not case sensitive.

Always use lowercase tag names and lowercase attribute names as best practice.

Example

    <h2>HTML Case sensitivity Example.</h2>
    <h1 style="color:red;">Hello World</h1>
Try it Now »

Click on the "Try it Now" button to see how it works.


Mixed Case

When tag names or attribute names are in the mixed case, the parser will convert them to lowercase letters.

Example

<Body>
    <h2>HTML Case sensitivity Example.</H2>
    <H1 id="a">Hello World</h1>
    <H1 ID="b">Hello w3context</h1>
</BODY>
Try it Now »

Click on the "Try it Now" button to see how it works.


Attribute values are case-sensitive

Note: While HTML tags and attribute names are case-insensitive, attribute values are case-sensitive.

The value of the attribute differs in the following example.

Example

<body>
  <h1 id="a">Hello w3context</h1>
  <p1 id="A">Hello w3context</p1> 
</body>
Try it Now »

Click on the "Try it Now" button to see how it works.