Home  >  Article  >  Web Front-end  >  Is css case insensitive?

Is css case insensitive?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-15 11:31:082305browse

In HTML files, CSS is not case-sensitive. When using CSS in XHTML, element names defined in CSS are case-sensitive. Cascading style sheets are a computer language used to express document styles such as HTML or XML.

Is css case insensitive?

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

Cascading Style Sheets (English full name: Cascading Style Sheets) is a computer used to express document styles such as HTML (an application of Standard Generalized Markup Language) or XML (a subset of Standard Generalized Markup Language). language.

In HTML files, CSS is not case-sensitive. When using CSS in XHTML, element names defined in CSS are case-sensitive.

Example:

<!DOCTYPE html PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
 <!-- 声明为XHTML类型的,如果去掉此行,则为普通的HTML类型 -->  
  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>URI utility</title>  
<style type="text/css">  
<!--  
BODY {  
    border: 1px solid blue;  
}  
.Row {  
    border: 1px solid red;  
    padding: 2px 2px 2px 2px;  
    margin: 4px 10px;  
}  
-->  
</style>  
</head>  
<body>  
<div class="main">  
    <form name="form1">  
        <div class="row">  
            <input type="text" name="uri1" size="60" /><br/>  
        </div>  
    </form>  
</div>  
</body>  
</html>

However, in XHTML, CSS is still case-insensitive for basic HTML tags. BODY in this example can still be applied to the

tag.

Effect comparison:

In XHTML:

Is css case insensitive?

In HTML:

Is css case insensitive?

Extended information:

XHTML

Extensible Hypertext Markup Language (English: eXtensible HyperText Markup Language, Text Markup Language (HTML) is similar, but syntactically stricter.

In terms of inheritance relationship, HTML is an application based on Standard General Markup Language (SGML) and is a very flexible markup language, while XHTML is based on Extensible Markup Language (XML). XML Is a subset of SGML. XHTML 1.0 became a W3C recommendation on January 26, 2000.

Recommended learning: css video tutorial

The above is the detailed content of Is css case insensitive?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn