Get the App
SLTechnology News&Howtos  ›  Development  › 

Are CSS selectors and ID selectors case sensitive?

Shulou Source: shulou.com Published: 2022-06-01 04:55:52 10月04日 Update

Today, I would like to share with you the relevant knowledge points of CSS selector and ID selector case-sensitive, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's take a look at it.

Note that class selectors and ID selectors may be case-sensitive. It depends on the language of the document. HTML and XHTML define the class and ID values as case-sensitive, so the case of the class and ID values must match the corresponding values in the document.

Therefore, for the following CSS and HTML, the element does not become bold:

# intro {font-weight:bold;} This is a paragraph of introduction.

Because the case of the letter I is different, the selector does not match the above elements.

What are the selectors of css? css selectors can be divided into three categories, namely, id selector, class selector and tag selector. There can be many combinations between them, such as descendant selector, sub-selector, pseudo-class selector, general selector, group selector, and so on.

That's all of the article "are CSS selectors and ID selectors case sensitive?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Selection size knowledge article different element content document face very large three big between depending on future generations many most letters that is more tags Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno vpn MariaDB Huawei NVidia