Home  >  Article  >  Web Front-end  >  Is html5 case sensitive?

Is html5 case sensitive?

WBOY
WBOYOriginal
2022-01-23 16:42:166225browse

In HTML5, it is not case-sensitive; the effect can be achieved by using uppercase or lowercase tag names, similar to

and

are the same, but it is recommended to use lowercase, because uppercase is used If so, strict browsers may produce unpredictable errors.

Is html5 case sensitive?

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

Is html5 case-sensitive?

HTML tags are not case-sensitive.

and

are the same, but lowercase is recommended because most programmers use lowercase as allow.

HTML5 is the same as HTML4, both are case-insensitive

standard syntax. HTML5 must be written in accordance with the specifications. Although advanced browsers can ignore it, strict browsers will Unpredictable errors occur!

The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            width:100px;
            height:100px;
            background-color:pink;
        }
    </style>
</head>
<body>
<!-- 使用了大写的DIV -->
    <DIV></div>
<!-- 使用了大写的P -->
<P>这段文本标签名使用了大写</P>
<p>这段文本标签名使用了小写</p>
</body>
</html>

Output result:

Is html5 case sensitive?

Recommended tutorial: "html video tutorial"

The above is the detailed content of Is html5 case sensitive?. 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