Home >Web Front-end >HTML Tutorial >Details about the tag in HTML
1a309583e26acea4f04ca31122d8c535The tag is very simple, you may not care. But have you ever carefully understood the 1a309583e26acea4f04ca31122d8c535 tag? W3cschool recommends using XHTML Transitional DTD, and many people obediently use Dreamweaver’s HTML document The default type is XHTML 1.0 Transitional. It has been used as a matter of course since then. People are really lazy as they grow up, and many things are subconsciously taken for granted. #The definition of1a309583e26acea4f04ca31122d8c535
1a309583e26acea4f04ca31122d8c535Usage
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">Analysis: In the above statement, Declares that the root element of the document is html, which is defined in a DTD with a public identifier defined as "-//W3C//DTD XHTML 1.0 Strict//EN". Browsers will know how to find a match for this public identifier. DTD. If not found, the browser will use the URL following the public identifier as the location to look for the DTD.
#- : Indicates that the organization name is not registered with the Internet Engineering Task Force (IETF). ) and the World Wide Web Consortium (W3C) are not registered ISO organizations.
object
type of thetype referenced. A unique descriptive name for the referenced public text. Can be followed by a version number. Defaults to HTML URL: Specifies the location of the referenced object. Strict: Exclude all representative
attributes <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" " http://www.w3.org/TR/html4/frameset.dtd">
XHTML 1.0 regulations Three XML document types are provided: Strict, Transitional, and Frameset.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
On the other hand, if the doctype declaration specifies an xhtml dtd, but the document contains old-style html markup, it is inappropriate; similarly, if the doctype declaration specifies an html dtd, but the document contains The xhtml 1.0 strict tag is also inappropriate.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
但是发现百度跟谷歌用的是“aba7b36f87decd50b18c7e3e3c150106”,就再仔细查了一下资料,发现HTML5也是直接用的这个,不过是因为 HTML 5 不基于 SGML,因此不需要对 DTD 进行引用,但是需要 doctype 来规范浏览器的行为(让浏览器按照它们应该的方式来运行)。
建议在以后都直接用“aba7b36f87decd50b18c7e3e3c150106”,用aba7b36f87decd50b18c7e3e3c150106的话就会开启浏览器的标准兼容模式,在标准兼容模式下,不能保证与其它版本(IE6之前的,直接忽略吧),的 Internet Explorer 保持兼容,文档的渲染行为也许与将来的 Internet Explorer 不同,但也请大家放心地使用吧~~
PS:XHTML 1就是HTML 4.01的XML化,是一种不向前兼容的格式。HTML 4.01 中的 doctype 需要对 DTD 进行引用,因为 HTML 4.01 基于 SGML。SGML规定了在文档中嵌入描述标记的标准格式,指定了描述文档结构的标准方法,目前在WEB上使用的HTML格式便是使用固定标签集的一种。
The above is the detailed content of Details about the tag in HTML. For more information, please follow other related articles on the PHP Chinese website!