Text mode in IE! Introduction to the role of DOCTYPE

Text mode in IE! Introduction to the role of DOCTYPE
After solving the form auto-fill problem discussed in the previous article, a new problem arose: some styles of the page were not displayed correctly in IE. The corresponding styles exist when checked through IE developer tools. Compared with the local HTML page that can be displayed correctly, the styles are basically the same, except that some font styles are displayed as font-size styles in the developer tools. Everything else is the same, including the margin style that causes the style to be displayed incorrectly. Finally, I found through the developer tools that the text modes of the two pages were different. The text mode of the page that could be displayed correctly was the standard mode, while the page that displayed abnormally was the miscellaneous mode.

When checking the source code of the web page, it was found that the abnormal web page was decorated by sitemesh, and the decorated page did not define the text mode !DOCTYPE, which caused the browser to fail to parse the web page through the standard mode.

! Document type (abbreviated as !DOCTYPE in English, full name DOCumentTYPE in English), a !DOCTYPE is a document type declaration of a standard generalized markup language. Its purpose is to tell the standard generalized markup language parser what kind of document type definition (DTD) it should use to parse the document. It appears as the first line of the file and has the following form:
<!DOCTYPE html
PUBLIC "Quoted String">
A "reference string" is called a public identifier, which refers to the desired Document Type Definition (DTD) by a "well-known" name, usually from an associated standard. [1]
Availability:
Specifies whether a formal public identifier (FPI) is a publicly accessible object or a system resource.
The Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C) are not registered ISO organizations.

<<:  Detailed explanation of Socket (TCP) bind from Linux source code

>>:  Some indicators of excellent web front-end design

Recommend

Use CSS's clip-path property to display irregular graphics

clip-path CSS properties use clipping to create t...

How to encapsulate the table component of Vue Element

When encapsulating Vue components, I will still u...

Implementation of docker redis5.0 cluster cluster construction

System environment: Ubuntu 16.04LTS This article ...

Linux 6 steps to change the default remote port number of ssh

The default ssh remote port in Linux is 22. Somet...

Docker automated build Automated Build implementation process diagram

Automated build means using Docker Hub to connect...

A brief discussion on the design and optimization of MySQL tree structure tables

Preface In many management and office systems, tr...

Sqoop export map100% reduce0% stuck in various reasons and solutions

I call this kind of bug a typical "Hamlet&qu...

Perfect solution for vertical centering of form elements

Copy code The code is as follows: <!DOCTYPE ht...

CentOS 7 configuration Tomcat9+MySQL solution

Configure Tomcat First install Tomcat Installing ...

A quick solution to the first login failure in mysql5.7.20

First, we will introduce how (1) MySQL 5.7 has a ...

Introduction to fork in multithreading under Linux

Table of contents Question: Case (1) fork before ...

Nginx merges request connections and speeds up website access examples

Preface As one of the best web servers in the wor...

The difference between MySQL user management and PostgreSQL user management

1. MySQL User Management [Example 1.1] Log in to ...