What the heck is this?
I talked about with my friends two days ago. Today I will sort out the information I learned online here
Because of the popularity of HTML5, people have slowly weakened their understanding of , but now many interviewers are still asking this question, so it is still necessary to understand it in order to have something to talk about in the future.
1. Does it have any magical effect?
To clarify this problem, let’s first explain the browser’s “standard mode” and “weird mode”.
What is "weird mode"? To put it simply, it is a page rendering mode produced by the browser in order to be compatible with web pages that were designed for older versions of browsers and did not strictly follow W3C standards. At this time, the rendering engine will also switch to the required version.
What is "standard mode"? When the user needs to display some new pages that meet W3C specifications, the rendering engine switches to a "standard mode" opposite to the "weird mode". In this mode, the rendering engine is the latest version. This also meets more W3C specifications.
Finally, “standard mode” and “weird mode” are collectively called the browser’s document mode.
In the era of IE6, in order to comply with W3C standards and ensure that old web pages can continue to be browsed, "standard mode" and "weird mode" were created. Both rendering modes exist in the same browser, but manual switching is impractical. Microsoft proposed the document type (DOCTYPE), a very "novel" concept at the time
In this way, "gorgeous" was born. Let's not talk about its advantages and disadvantages. Let's just talk about its function: telling the browser's parser what document standard to use to parse this document.
2. Will it be affected if does not exist or is in the wrong format?
DOCTYPE that does not exist or is incorrectly formatted will cause the document to be rendered in "weird mode".
3.Why does HTML5 only need to write
HTML5 is not based on SGML, so there is no need to reference DTD (Document Type Definition), but doctype is needed to regulate browser behavior (let browsers run the way they should).
And HTML4.01 is based on SGML, so it needs to reference the DTD (Document Type Definition) to inform the browser of the document type used in the document.
Note: SGML is an international standard for defining electronic documents and content descriptions. The basic idea is to separate the content and style of the document. It consists of SGML Declaration, Document Type Definition (DTD) and Document Instance.
Reference source:
http://www.cnblogs.com/zichi/p/5147159.html

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version
Chinese version, very easy to use

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools
