Home > Article > Web Front-end > Is html5 case sensitive?
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.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
HTML tags are not case-sensitive.
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:
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!