Is HTML case sensitive?
No, but it's considered good practice to keep HTML markup lowercase.
HTML & case sensitive
Yes, reserved entities in HTML are case sensitive.
Browsers will be nice to you and accept whatever you give them, but you should be using the proper casing.
See also: https://www.w3.org/TR/html52/syntax.html#named-character-references
are html5 data attributes case insensitive?
You should always use lowercase characters. Even though some browser do automatically correct mistakes in the markup (that's what Chrome does for you here) it can cause errors and isn't valid HTML5.
From MDN:
- the name must not start with xml, whatever case is used for these
letters; - the name must not contain any semicolon (U+003A);
- the name
must not contain capital A to Z letters.
EDIT
After some more research I've found this:
All attribute names on HTML elements in HTML documents get
ASCII-lowercased automatically, so the restriction on ASCII uppercase
letters doesn't affect such documents.
HTML case sensitive issue
A URL is case-sensitive past the domain name. example.com
and EXAMPLE.COM
both resolve to the same address, but anything after the domain name is case-sensitive.
Now come the filesystems. Windows uses NTFS, which is not case-sensitive, so abc.html
and aBc.html
refer to the same file. Most Linux distros use EXT4, which is case-sensitive, so abc.html
and aBc.html
are two different files.
In short, your webserver is running on a filesystem where filenames are case-sensitive, so abc.html
and aBc.html
refer to two different files.
Are Values of the HTML lang Attribute Case-sensitive?
I believe that the lang attribute is not affected by the case of the language. From what I have seen,<html lang="en-ca">
is the same as <html lang="EN-CA">
, but for safety, you should probably just use <html lang="en-ca">
.
Are property values in CSS case-sensitive?
(updating @ÁlvaroG.Vicario answer and comments, and complementing this answer... This is a Wiki, please edit to enhance)
Example: for CSS3 (and HTML5) there are new explicit rules, as "font-face
property must be case-insensitive".[2]
Context
W3C interoperating standards, mainly XML, HTML, CSV and CSS.
CSS general rules
CSS2 (a W3C standard of 2008) fixed basic conventions about "Characters and case", and CSS3 (a W3C standard for 2015) added something more.
By default "all CSS syntax is case-insensitive (...)" [1]
There are exceptions, "(...) except for parts that are not under the control of CSS"[1]
2.1. element names are case-sensitive in HTML5 (?) and XML, but case-insensitive in HTML4.
2.2. identifiers (including element names, classes, and IDs in selectors) are case-sensitive. HTML attributes id
and class
, of font names, and of URIs lies outside the scope of the CSS specification.
....
The
Case matrix
Exceptions and specific (explicited in a reference) rules. "YES" indicate that value is case-sensitive.
Property values:
CSS property | Case-sens. | Reference and notes
------------------|------------|--------------------
%colorVals | NO | [3]
font-family | NO | [2]
%url | YES | ...
content | YES | ...
----------------------------------------------------
%colorVals = color, background, etc.
%url = background-image, etc. that use `url()`, see [7] and notes.
Selector values:
CSS selector | Case-sens. | Reference and notes
------------------|------------|--------------------
id | YES |...
element | YES/NO | ... YES for XML...
class name | YES | [5]
(`~ i` operator) | NO | [6]
----------------------------------------------------
YES/NO = depends on the document language (see ref. and notes).
REFERENCES:
[1] W3C/CSS2/syndata, sec. 4.1.3 Characters and case.
[2] W3C/CSS3-fonts, sec. 5.1 Case sensitivity of font family names
[3] W3C/CSS3-color, sec. 4.1. Basic color keywords
[4] W3C/CSS3-values, sec. 3.1. Pre-defined Keywords
[5] W3C/Selectors, sec. 3. Case sensitivity
[6] W3C/Selectors4, sec. 6.3. Case-sensitivity
[7] RFC 3986 and URL syntax illustration at Wikipedia.
Quotations and notes
Typical URLs starts with domain, that is case insensitive, but after it (path, query or fragment syntatical components), is case sensitive. See [7].
"User agents must match these names case insensitively". [2]
In the DOM are node ids case sensititve?
Yes. It is case-sensitive. Attribute values are always case-sensitive. Different browsers seem to be doing different things though.
Handling document.getElementById
is different across browsers:
Mozilla performs case-sensitive search.
Internet Explorer: IE 8 and later performs case-sensitive search, while IE 7 and earlier performs case-insensitive search.
Which are case sensitive among php/javascript/html?
HTML is not case-sensitive (XHTML is, though).
PHP respects case in variable names, but not functions.
Javascript is case-sensitive.
Is Angular 2/4 really case sensitive?
Yes it's because angular
2/4 use typescript
which is case sensitive.
and here in your case the ngFor
is a structural directive
in angular
but in innerHTML
, it is a HTML
property and HTML
isn't a case sensitive.
Related Topics
What Is the Best Practice to Parse HTML in Swift
Wcf Service to Accept a Post Encoded Multipart/Form-Data
Text Overflow Ellipsis on Two Lines
Full Width Backgrounds on Outlook '07/'10/'13
How to Align Two Divs Horizontally
Soft Hyphen in HTML (<Wbr> VS. &Shy;)
Youtube Embedded Video: Autoplay Feature Not Working in Iphone
How to Make a Link from a <Td> Table Cell
What Characters Are Allowed in the HTML Name Attribute Inside Input Tag
Next.Js Redirect From/To Another Page
Is an Anchor Tag Without the Href Attribute Safe
Unwanted Margin in Inline-Block List Items
How to Uninstall a Service Worker
Space Between Nowrap Inline Blocks
Media Queries For Different Zoom Levels of Browser
Custom Bullet Symbol for <Li> Elements in <Ul> That Is a Regular Character, and Not an Image