Tag:doctype

  • Abbreviation for HTML DOCTYPE

    Time:2021-11-23

    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

    Time:2021-11-10

    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)

    Time:2021-10-4

    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

    Time:2021-8-30

    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

    Time:2021-8-29

    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

    Time:2021-8-4

    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

    Time:2021-6-26

    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

    Time:2021-6-22

    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

    Time:2021-1-31

    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

    Time:2020-7-27

    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 […]

  • HTML version declaration DOCTYPE tag

    Time:2020-7-7

    When we open the source code of a regular website, we will find that the source code must start with <! DOCTYPE HTML, and some of the <! DOCTYPE > are directly added with > and some have long text, such as <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> Of course, the […]

  • Talking about DOCTYPE and coding of HTML

    Time:2019-6-7

    DOCTYPE Doctype is designed to tell browsers which version of HTML to parse instructions. It must be on the first line. In some versions, DTD needs to be introduced. HTML5 does not need DTD. Chinese random code Reason The encoding format of browser parsing code is inconsistent with that of source code. For example, if […]