DOCTYPE中SYSTEM和PUBLIC区别
来源:互联网 发布:c语言 原版书 编辑:程序博客网 时间:2024/05/19 18:12
HTML <!DOCTYPE> Declaration
DOCTYPEs are required for legacy reasons. HTML is responsible for telling a Web browser how text and other objects in a Web Page should appear. As per HTML standards, each HTML document requires a document type declaration (DTD). DOCTYPE is a declaration and always appears at the very top of your documents. If it is omitted, web browsers tend to use a different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a document ensures that the web browser makes a responsible attempt at following the relevant specifications.
The root element that represents the document is the first element in the document. The keywords PUBLIC and SYSTEM represent what kind of Document Type Definition it is . If it is PUBLIC, then this keyword is followed by a restricted form of "public identifier" called FPI (Formal Public Identifier) and If it is SYSTEM, only a system identifier must be given. It states that the XML parser must locate the Document Type Definition (DTD) in a system specific manner.
Example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
The above code declares the document to be HTML 4.01 Strict
The DOCTYPE statement indicates the particular version of HTML being used in the document. It is used to check the document for validity. DOCTYPE declaration is not an HTML tag. It is only a declaration and always appears at the first line of your HTML documents.
HTML5 Doctype
<!DOCTYPE html>
Above code is the HTML5 DOCTYPE declaration which is very short, due to its lack of references to a Document Type Definition (DTD) in the form of a URL or FPI (Formal Public Identifier). In HTML5, the formal syntax is defined in upper case letters, even if both lower case and mixes of lower case upper case are also treated as valid. Moreover HTML5 is not based on SGML, uses the DOCTYPE only for mode selection. The declaration is supported in all major browsers.
HTML 4.01 Strict
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
It does not allow Framesets, presentational or deprecated elements.
HTML 4.01 Transitional
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
Transitional DTD allows some older PUBLIC and attributes that have been deprecated, Framesets are not allowed.
HTML 4.01 Frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN""http://www.w3.org/TR/html4/frameset.dtd">
Framesets allowed, and all elements and attributes are equal to HTML 4.01 Transitional
XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Framesets are not allowed and it does NOT INCLUDE presentational or deprecated elements
XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Framesets are not allowed and it INCLUDING presentational and deprecated elements
XHTML 1.0 Frameset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
It is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
XHTML 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
It is equal to XHTML 1.0 Strict, but allows you to add modules
- See more at: http://www.corelangs.com/html/introduction/doctype.html#sthash.Z2ukVxFg.dpuf- DOCTYPE中SYSTEM和PUBLIC区别
- XML中关于DTD类型(内部(SYSTEM)的和外部(PUBLIC)的区别)
- DOCTYPE中HTML和XHTML之间的区别
- 关于DOCTYPE html PUBLIC
- 关于在 xmlSPY 出现的错误 DOCTYPE-EXternalID的名称必须既是SYSTEM 又是PUBLIC?
- c++中,class C:public A,B和class C:public A,public B有什么区别
- Java中public、private和protected的区别
- C++中public、protect和private用法区别
- Java中public,private,protected,和默认的区别
- VBA中dim,static和public,private的区别
- Java中gitter、setter方法和public的区别
- Java中说明private,protected,public和default的区别
- JAVA中public private protected和默认的区别
- Java中private、protected、public和default的区别
- Java中private、protected、public和default的区别
- Java中private、protected、public和default的区别
- Java中private、protected、public和default的区别
- Java中private、protected、public和default的区别
- iOS手势识别器
- Android for MSM Project,Downloading and Building from Source
- 我的openwrt学习笔记(二十一):广域网IP地址获取_socket http
- BUN 34981 A Matrix
- sort的用法
- DOCTYPE中SYSTEM和PUBLIC区别
- 【图像处理】所谓的“快速积分图”,其实并不快
- DDoS态势报告 DDoS攻击两极分化
- hdu 5367 digger(线段树)
- Android 2D Graphics学习(二)、Canvas篇1、Canvas基本使用
- Leet——code 刷题_顺序
- json中null的处理
- MATLAB 求解符号表达式数值的方法:subs函数
- mac修改open files数目