• XHTML three file type declarations


    XHTML defines three file type declarations. The most commonly used is XHTML transitional.<! DOCTYPE > is mandatory.An XHTML document has three main parts:The basic document structure is as follows:<!DOCTYPE …><html><head><title>… </title></head><body> … </body></html> In XHTML documents, the document type declaration is always on the first line.This is a simple (minimized) XHTML document:<!DOCTYPE htmlPUBLIC “-//W3C//DTD XHTML […]

  • HTML tutorial: abbreviation of DOCTYPE


    When writing HTML code, DOCTYPE should be written in the first line. DOCTYPE is usually very long and we are too lazy to remember, so we basically copy what we have written before. But today I learned an abbreviation of DOCTYPE, if your DOCTYPE is like thisWhen writing HTML code, DOCTYPE should be written in […]

  • Abbreviation for HTML DOCTYPE


    If your DOCTYPE is as follows: Copy code The code is as follows: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> The following abbreviations can be used instead: Copy code The code is as follows: <!DOCTYPE HTML> Simple and easy to remember, so you don’t need to copy in the future. BTW, I want to draw […]

  • Selection mechanism of DOCTYPE mode by well-known browsers


    Document scope The mode switching included in this article is applicable to Firefox and other gecko based browsers, Safari, chrome and other WebKit based browsers, opera, Konqueror, Internet Explorer for Mac, Internet Explorer for windows and browsers with embedded ie. Avoid mentioningThe name of the browser engineInstead, use the name of the most famous browser […]

  • DOCTYPE document type declaration (required for web page lovers)


    Document type declarationAt the top of each page, you need a document declaration. Yes, I must. If you don’t specify the document type, your HTML is not legal HTML, and most browsers use “quirks mode” to process pages, which means that the browser thinks you don’t know what to do, and processes your code in […]

  • Neglected DOCTYPE description analysis


    DOCTYPE is one of them:<!DOCTYPE HTML PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”> 1. What is DOCTYPE The document type tag is used to specify the DTD (document type definition) of the document and is written at the front of each HTML, such as:  <!DOCTYPE RootElement Availability “URI” [declarations]> For example, several common DOCTYPES:HTML 4.01: Strict<!DOCTYPE HTML PUBLIC […]

  • Markup validation of DOCTYPE


    However, it has recently been found that using this method will cause problems. See the code: Copy code The code is as follows: <!DOCTYPE HTML><html><head><title>test page</title></head><body><p><div>a</div></p></body></html> If this code is detected with W3C markup validation, it is found that it can pass the verification. Because the HTML5 verification is still in the experimental stage, no […]

  • Why use DOCTYPE HTML


    You know that without it, browsers will use weird mode when rendering pages; You know that browsers render elements differently in weird mode. So you would write a DOCTYPE like this: Copy code The code is as follows: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> Fortunately, various web development tools are powerful enough to […]

  • Function and usage of DOCTYPE declaration


    1、 Browser rendering mode and DOCTYPE Some web pages are created according to standards, but many are not. Even if you can’t create a standard compliant web page, you want the browser to display those pages correctly according to the standard. At present, a large number of web pages are full of a large number […]

  • Complete version of DOCTYPE elements


    1、 Overview This paper systematically explains the element of DOCTYPE. At the same time, it checks a lot of information. Because the information on the Internet is messy, I redefine it after collection. For example, the definition of DOCTYPE element is mainly divided into basic knowledge and advanced knowledge. Basic knowledge explains basic DOCTYPE knowledge. […]

  • Ie text mode! Introduction to the role of DOCTYPE


    After solving the problem of form auto filling mentioned in the previous article, we encounter a new problem, that is, some styles of the page are not displayed correctly in ie. Check the existence of corresponding styles through IE developer tools. Compared with the local HTML pages that can be displayed correctly, the styles are […]

  • The function of HTML DOCTYPE


    The document mode has the following two functions: 1. Tell the browser what HTML or XHTML specification to use to parse HTML documents 2. It has an impact on the browser’s rendering mode; different rendering modes will affect the browser’s parsing of CSS code and even JavaScript script, so DOCTYPE is very important, especially in […]