1, HTML5 why add <! DOCTYPE HTML>
(1) HTML5 is not based on SGML (Standard Common Markup Language), so there is no need to reference DTD (Document Type Definition), but DOCTYPE is needed to regulate the behavior of browsers and make them behave the way they do. (2) HTML4.01 is based on SGML. It needs to reference DTD to let the browser know the document type used by the documentCopy the code
2, HTML5 new features, semantic
(1) Content elements :airticle(defines external content), footer(defines document footer), header(defines the home page), nav(defines navigation links), Section (defines an area in the document, explains something); (2) Form controls: Calendar (calendar control), data(date control), time(time control), Email (mailbox control), URL (address control), search(query control). (3) Control elements: Webworker, websockt, Geolocation (4) Semantic: it is to use reasonable and correct labels to display content, such as H1 ~ H6 to define the title. (5) Advantages: easy for users to read, when the style is lost, the page can present a clear structure. SEO benefits. Search engines use tags to determine the context and weight of individual keywords. Easy for other devices to parse, such as blind readers render web pages according to semantics. It is conducive to development and maintenance, more readable semantics, more maintainable code, and more harmonious relationship with CSS3.Copy the code
XHTML and HTML
(1) Different base languages: XHTML is based on extensible markup language XML; HTML is based on standard common language. (2) Different degrees of syntax strictness: XHTML syntax is relatively strict, and there are DTD definition rules; HTML syntax requirements are relatively loose, which is more convenient for web page writers. (3) Can mix different applications: XHTML can mix various XML applications, such as MathML and SVG; HTML cannot be mixed with other XML applications. (4) Case-sensitive: XHTML is case-sensitive, so the standard XHTML tag should be lowercase. HTML is case insensitive. (5) Different publication dates: XHTML was published by W3C in 2000; HTML4.01 is a 1999 W3C recommendation.Copy the code
4, common browser kernel and understanding
The browser kernel is usually the rendering engine used by the browser, which determines how the browser displays the content of the web page and how the page is formatted. (1) Webkit kernel: Safari,Chrome, etc. (2) Trident kernel: IE,MaxThon,TT,The World,360, Sogou, etc. [also known as MSHTML] (3) the Gecko kernel: Netscape6 and above version, FF, MozillaSuite/SeaMonkey, etc. (4) Presto kernel: Opera7 and above. [Opera kernel was Presto, now is Blink;] . (5) EdgeHTML kernel: Microsoft Edge This kernel is actually from MSHTML fork, which removes almost all IE proprietary features.Copy the code