文章转自:
http://www.cnblogs.com/gumgum/archive/2011/09/30/2196752.html
<!DOCTYPE> 标签的深度剖析以及使用选择
前言:
今天被问道“有没有仔细了解过<!DOCTYPE>标签?”,愣了一下,因为一开始在W3cschool上看到过建议使用XHTML Transitional DTD,之后就很听话地把Dreamweaver的HTML文档类型默认设置为XHTML 1.0 Transitional。之后就理所当然地一直用到现在了。人这东西还真是,越长大就越懒了,很多东西都被潜意识地当成了理所当然。既然已经被问及,就去找了找资料,总结了一下,权当做笔记吧~~
<!DOCTYPE>的定义:
<!DOCTYPE>声明位于文档中的最前面的位置,处于<html>标签之前。此标签可告知浏览器文档使用哪种HTML或XHTML规范。
该标签可声明三种DTD类型,分别表示严格版本、过渡版本以及基于框架的HTML版本。(假如文档中的标记不遵循doctype声明所指定的DTD,这个文档除了不能通过代码校验之外,还有可能无法在浏览器中正确显示。)
<!DOCTYPE>的用法:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
解析:在上面的声明中,声明了文档的根元素是 html,它在公共标识符被定义为 "-//W3C//DTD XHTML 1.0 Strict//EN" 的 DTD 中进行了定义。浏览器将明白如何寻找匹配此公共标识符的 DTD。如果找不到,浏览器将使用公共标识符后面的 URL 作为寻找 DTD 的位置。
- : 表示组织名称未注册。Internet 工程任务组(IETF)和万维网协会(W3C)并非注册的 ISO 组织。
+为默认,表示组织名称已注册。
DTD : 指定公开文本类,即所引用的对象类型。 默认为DTD。
HTML : 指定公开文本描述,即对所引用的公开文本的唯一描述性名称。后面可附带版本号。默认为HTML。
URL : 指定所引用对象的位置。
Strict:排除所有 W3C 专家希望逐步淘汰的代表性属性和元素。
三种HTML文档类型:
HTML 4.01 规定了三种文档类型:Strict、Transitional 以及 Frameset。
a ) 如果需要干净的标记,免于表现层的混乱,用HTML Strict DTD类型:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
b )Transitional DTD 可包含 W3C 所期望移入样式表的呈现属性和元素. 如果用户使用了不支持层叠样式表(CSS)的浏览器以至于你不得不使用 HTML 的呈现特性时,用 Transitional DTD 类型:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd">
c ) Frameset DTD 被用于带有框架的文档。除 frameset 元素取代了 body 元素之外,Frameset DTD 等同于 Transitional DTD:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" " http://www.w3.org/TR/html4/frameset.dtd">
三种 XML 文档类型:
XHTML 1.0 规定了三种 XML 文档类型:Strict、Transitional 以及 Frameset。
a ) 如果需要干净的标记,免于表现层的混乱,用XHTML Strict DTD类型:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
b )Transitional DTD 可包含 W3C 所期望移入样式表的呈现属性和元素. 如果用户使用了不支持层叠样式表(CSS)的浏览器以至于你不得不使用 HTML 的呈现特性时,用 Transitional DTD 类型:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
c ) Frameset DTD 被用于带有框架的文档。除 frameset 元素取代了 body 元素之外,Frameset DTD 等同于 Transitional DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
选择正确的doctype:
为了获得正确的doctype声明,关键就是让dtd与文档所遵循的标准对应。
例如,假定文档遵循的是xhtml 1.0 strict标准,文档的doctype声明就应该引用相应的dtd。
另一方面,如果doctype声明指定的是xhtml dtd,但文档包含的是旧式风格的html标记,就是不恰当的;类似地,如果doctype声明指定的是html dtd,但文档包含的是
xhtml 1.0 strict标记,同样是不恰当的。
如果没有指定有效的doctype声明,大多数浏览器都会使用一个内建的默认dtd。在这种情况下, 浏览器会用内建的dtd来试着显示你所指定的标记(不过这是页面写得太糟糕的时候的做法)。
看了一下京东、淘宝、还有博客园,用的都是这个(本人也一直都是用的这个):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
但是发现百度跟谷歌用的是“<!doctype html>”,就再仔细查了一下资料,发现HTML5也是直接用的这个,不过是因为 HTML 5 不基于 SGML,因此不需要对 DTD 进行
引用,但是需要 doctype 来规范浏览器的行为(让浏览器按照它们应该的方式来运行)。
建议在以后都直接用“<!doctype html>”,用<!doctype html>的话就会开启浏览器的标准兼容模式,在标准兼容模式下,不能保证与其它版本(IE6之前的,直接忽略吧),的 Internet Explorer 保持兼容,文档的渲染行为也许与将来的 Internet Explorer 不同,但也请大家放心地使用吧~~
--------------------------------------------------------------
现在淘宝 网易 的首页是用的是
<!DOCTYPE html>
京东商城 新浪
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">。
HTML:
HTML 4.01 Strict DTD
<!-- This is HTML 4.01 Strict DTD, which excludes the presentation attributes and elements that W3C expects to phase out as support for style sheets matures. Authors should use the Strict DTD when possible, but may use the Transitional DTD when support for presentation attribute and elements is required. HTML 4 includes mechanisms for style sheets, scripting, embedding objects, improved support for right to left and mixed direction text, and enhancements to forms for improved accessibility for people with disabilities. Draft: $Date: 1999/12/24 23:37:48 $ Authors: Dave Raggett <dsr@w3.org> Arnaud Le Hors <lehors@w3.org> Ian Jacobs <ij@w3.org> Further information about HTML 4.01 is available at: http://www.w3.org/TR/1999/REC-html401-19991224 The HTML 4.01 specification includes additional syntactic constraints that cannot be expressed within the DTDs. --> <!-- Typical usage: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> ... </head> <body> ... </body> </html> The URI used as a system identifier with the public identifier allows the user agent to download the DTD and entity sets as needed. The FPI for the Transitional HTML 4.01 DTD is: "-//W3C//DTD HTML 4.01 Transitional//EN" This version of the transitional DTD is: http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd If you are writing a document that includes frames, use the following FPI: "-//W3C//DTD HTML 4.01 Frameset//EN" This version of the frameset DTD is: http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd Use the following (relative) URIs to refer to the DTDs and entity definitions of this specification: "strict.dtd" "loose.dtd" "frameset.dtd" "HTMLlat1.ent" "HTMLsymbol.ent" "HTMLspecial.ent" --> <!--================== Imported Names ====================================--> <!-- Feature Switch for frameset documents --> <!ENTITY % HTML.Frameset "IGNORE"> <!ENTITY % ContentType "CDATA" -- media type, as per [RFC2045] --> <!ENTITY % ContentTypes "CDATA" -- comma-separated list of media types, as per [RFC2045] --> <!ENTITY % Charset "CDATA" -- a character encoding, as per [RFC2045] --> <!ENTITY % Charsets "CDATA" -- a space-separated list of character encodings, as per [RFC2045] --> <!ENTITY % LanguageCode "NAME" -- a language code, as per [RFC1766] --> <!ENTITY % Character "CDATA" -- a single character from [ISO10646] --> <!ENTITY % LinkTypes "CDATA" -- space-separated list of link types --> <!ENTITY % MediaDesc "CDATA" -- single or comma-separated list of media descriptors --> <!ENTITY % URI "CDATA" -- a Uniform Resource Identifier, see [URI] --> <!ENTITY % Datetime "CDATA" -- date and time information. ISO date format --> <!ENTITY % Script "CDATA" -- script expression --> <!ENTITY % StyleSheet "CDATA" -- style sheet data --> <!ENTITY % Text "CDATA"> <!-- Parameter Entities --> <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements --> <!ENTITY % heading "H1|H2|H3|H4|H5|H6"> <!ENTITY % list "UL | OL"> <!ENTITY % preformatted "PRE"> <!--================ Character mnemonic entities =========================--> <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" "HTMLlat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols//EN//HTML" "HTMLsymbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special//EN//HTML" "HTMLspecial.ent"> %HTMLspecial; <!--=================== Generic Attributes ===============================--> <!ENTITY % coreattrs "id ID #IMPLIED -- document-wide unique id -- class CDATA #IMPLIED -- space-separated list of classes -- style %StyleSheet; #IMPLIED -- associated style info -- title %Text; #IMPLIED -- advisory title --" > <!ENTITY % i18n "lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --" > <!ENTITY % events "onclick %Script; #IMPLIED -- a pointer button was clicked -- ondblclick %Script; #IMPLIED -- a pointer button was double clicked-- onmousedown %Script; #IMPLIED -- a pointer button was pressed down -- onmouseup %Script; #IMPLIED -- a pointer button was released -- onmouseover %Script; #IMPLIED -- a pointer was moved onto -- onmousemove %Script; #IMPLIED -- a pointer was moved within -- onmouseout %Script; #IMPLIED -- a pointer was moved away -- onkeypress %Script; #IMPLIED -- a key was pressed and released -- onkeydown %Script; #IMPLIED -- a key was pressed down -- onkeyup %Script; #IMPLIED -- a key was released --" > <!-- Reserved Feature Switch --> <!ENTITY % HTML.Reserved "IGNORE"> <!-- The following attributes are reserved for possible future use --> <![ %HTML.Reserved; [ <!ENTITY % reserved "datasrc %URI; #IMPLIED -- a single or tabular Data Source -- datafld CDATA #IMPLIED -- the property or column name -- dataformatas (plaintext|html) plaintext -- text or html --" > ]]> <!ENTITY % reserved ""> <!ENTITY % attrs "%coreattrs; %i18n; %events;"> <!--=================== Text Markup ======================================--> <!ENTITY % fontstyle "TT | I | B | BIG | SMALL"> <!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM" > <!ENTITY % special "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO"> <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> <!-- %inline; covers inline or "text-level" elements --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> <!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*> <!ATTLIST (%fontstyle;|%phrase;) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> <!ATTLIST (SUB|SUP) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT SPAN - - (%inline;)* -- generic language/style container --> <!ATTLIST SPAN %attrs; -- %coreattrs, %i18n, %events -- %reserved; -- reserved for possible future use -- > <!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride --> <!ATTLIST BDO %coreattrs; -- id, class, style, title -- lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #REQUIRED -- directionality -- > <!ELEMENT BR - O EMPTY -- forced line break --> <!ATTLIST BR %coreattrs; -- id, class, style, title -- > <!--================== HTML content models ===============================--> <!-- HTML has two basic content models: %inline; character level elements and text strings %block; block-like elements e.g. paragraphs and lists --> <!ENTITY % block "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS"> <!ENTITY % flow "%block; | %inline;"> <!--=================== Document Body ====================================--> <!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body --> <!ATTLIST BODY %attrs; -- %coreattrs, %i18n, %events -- onload %Script; #IMPLIED -- the document has been loaded -- onunload %Script; #IMPLIED -- the document has been removed -- > <!ELEMENT ADDRESS - - (%inline;)* -- information on author --> <!ATTLIST ADDRESS %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ATTLIST DIV %attrs; -- %coreattrs, %i18n, %events -- %reserved; -- reserved for possible future use -- > <!--================== The Anchor Element ================================--> <!ENTITY % Shape "(rect|circle|poly|default)"> <!ENTITY % Coords "CDATA" -- comma-separated list of lengths --> <!ELEMENT A - - (%inline;)* -(A) -- anchor --> <!ATTLIST A %attrs; -- %coreattrs, %i18n, %events -- charset %Charset; #IMPLIED -- char encoding of linked resource -- type %ContentType; #IMPLIED -- advisory content type -- name CDATA #IMPLIED -- named link end -- href %URI; #IMPLIED -- URI for linked resource -- hreflang %LanguageCode; #IMPLIED -- language code -- rel %LinkTypes; #IMPLIED -- forward link types -- rev %LinkTypes; #IMPLIED -- reverse link types -- accesskey %Character; #IMPLIED -- accessibility key character -- shape %Shape; rect -- for use with client-side image maps -- coords %Coords; #IMPLIED -- for use with client-side image maps -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!--================== Client-side image maps ============================--> <!-- These can be placed in the same document or grouped in a separate document although this isn't yet widely supported --> <!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map --> <!ATTLIST MAP %attrs; -- %coreattrs, %i18n, %events -- name CDATA #REQUIRED -- for reference by usemap -- > <!ELEMENT AREA - O EMPTY -- client-side image map area --> <!ATTLIST AREA %attrs; -- %coreattrs, %i18n, %events -- shape %Shape; rect -- controls interpretation of coords -- coords %Coords; #IMPLIED -- comma-separated list of lengths -- href %URI; #IMPLIED -- URI for linked resource -- nohref (nohref) #IMPLIED -- this region has no action -- alt %Text; #REQUIRED -- short description -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!--================== The LINK Element ==================================--> <!-- Relationship values can be used in principle: a) for document specific toolbars/menus when used with the LINK element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel=stylesheet) c) to make a link to a script (rel=script) d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a postscript or pdf version (rel=alternate media=print) --> <!ELEMENT LINK - O EMPTY -- a media-independent link --> <!ATTLIST LINK %attrs; -- %coreattrs, %i18n, %events -- charset %Charset; #IMPLIED -- char encoding of linked resource -- href %URI; #IMPLIED -- URI for linked resource -- hreflang %LanguageCode; #IMPLIED -- language code -- type %ContentType; #IMPLIED -- advisory content type -- rel %LinkTypes; #IMPLIED -- forward link types -- rev %LinkTypes; #IMPLIED -- reverse link types -- media %MediaDesc; #IMPLIED -- for rendering on these media -- > <!--=================== Images ===========================================--> <!-- Length defined in strict DTD for cellpadding/cellspacing --> <!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length --> <!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative --> <![ %HTML.Frameset; [ <!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength --> ]]> <!ENTITY % Pixels "CDATA" -- integer representing length in pixels --> <!-- To avoid problems with text-only UAs as well as to make image content understandable and navigable to users of non-visual UAs, you need to provide a description with ALT, and avoid server-side image maps --> <!ELEMENT IMG - O EMPTY -- Embedded image --> <!ATTLIST IMG %attrs; -- %coreattrs, %i18n, %events -- src %URI; #REQUIRED -- URI of image to embed -- alt %Text; #REQUIRED -- short description -- longdesc %URI; #IMPLIED -- link to long description (complements alt) -- name CDATA #IMPLIED -- name of image for scripting -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- > <!-- USEMAP points to a MAP element which may be in this document or an external document, although the latter is not widely supported --> <!--==================== OBJECT ======================================--> <!-- OBJECT is used to embed objects as part of HTML pages PARAM elements should precede other content. SGML mixed content model technicality precludes specifying this formally ... --> <!ELEMENT OBJECT - - (PARAM | %flow;)* -- generic embedded object --> <!ATTLIST OBJECT %attrs; -- %coreattrs, %i18n, %events -- declare (declare) #IMPLIED -- declare but don't instantiate flag -- classid %URI; #IMPLIED -- identifies an implementation -- codebase %URI; #IMPLIED -- base URI for classid, data, archive-- data %URI; #IMPLIED -- reference to object's data -- type %ContentType; #IMPLIED -- content type for data -- codetype %ContentType; #IMPLIED -- content type for code -- archive CDATA #IMPLIED -- space-separated list of URIs -- standby %Text; #IMPLIED -- message to show while loading -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- name CDATA #IMPLIED -- submit as part of form -- tabindex NUMBER #IMPLIED -- position in tabbing order -- %reserved; -- reserved for possible future use -- > <!ELEMENT PARAM - O EMPTY -- named property value --> <!ATTLIST PARAM id ID #IMPLIED -- document-wide unique id -- name CDATA #REQUIRED -- property name -- value CDATA #IMPLIED -- property value -- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value -- type %ContentType; #IMPLIED -- content type for value when valuetype=ref -- > <!--=================== Horizontal Rule ==================================--> <!ELEMENT HR - O EMPTY -- horizontal rule --> <!ATTLIST HR %attrs; -- %coreattrs, %i18n, %events -- > <!--=================== Paragraphs =======================================--> <!ELEMENT P - O (%inline;)* -- paragraph --> <!ATTLIST P %attrs; -- %coreattrs, %i18n, %events -- > <!--=================== Headings =========================================--> <!-- There are six levels of headings from H1 (the most important) to H6 (the least important). --> <!ELEMENT (%heading;) - - (%inline;)* -- heading --> <!ATTLIST (%heading;) %attrs; -- %coreattrs, %i18n, %events -- > <!--=================== Preformatted Text ================================--> <!-- excludes markup for images and changes in font size --> <!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP"> <!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text --> <!ATTLIST PRE %attrs; -- %coreattrs, %i18n, %events -- > <!--===================== Inline Quotes ==================================--> <!ELEMENT Q - - (%inline;)* -- short inline quotation --> <!ATTLIST Q %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > <!--=================== Block-like Quotes ================================--> <!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT)+ -- long quotation --> <!ATTLIST BLOCKQUOTE %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > <!--=================== Inserted/Deleted Text ============================--> <!-- INS/DEL are handled by inclusion on BODY --> <!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text --> <!ATTLIST (INS|DEL) %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- info on reason for change -- datetime %Datetime; #IMPLIED -- date and time of change -- > <!--=================== Lists ============================================--> <!-- definition lists - DT for term, DD for its definition --> <!ELEMENT DL - - (DT|DD)+ -- definition list --> <!ATTLIST DL %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT DT - O (%inline;)* -- definition term --> <!ELEMENT DD - O (%flow;)* -- definition description --> <!ATTLIST (DT|DD) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT OL - - (LI)+ -- ordered list --> <!ATTLIST OL %attrs; -- %coreattrs, %i18n, %events -- > <!-- Unordered Lists (UL) bullet styles --> <!ELEMENT UL - - (LI)+ -- unordered list --> <!ATTLIST UL %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT LI - O (%flow;)* -- list item --> <!ATTLIST LI %attrs; -- %coreattrs, %i18n, %events -- > <!--================ Forms ===============================================--> <!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form --> <!ATTLIST FORM %attrs; -- %coreattrs, %i18n, %events -- action %URI; #REQUIRED -- server-side form handler -- method (GET|POST) GET -- HTTP method used to submit the form-- enctype %ContentType; "application/x-www-form-urlencoded" accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- name CDATA #IMPLIED -- name of form for scripting -- onsubmit %Script; #IMPLIED -- the form was submitted -- onreset %Script; #IMPLIED -- the form was reset -- accept-charset %Charsets; #IMPLIED -- list of supported charsets -- > <!-- Each label must not contain more than ONE field --> <!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text --> <!ATTLIST LABEL %attrs; -- %coreattrs, %i18n, %events -- for IDREF #IMPLIED -- matches field ID value -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT | RESET | FILE | HIDDEN | IMAGE | BUTTON)" > <!-- attribute name required for all but submit and reset --> <!ELEMENT INPUT - O EMPTY -- form control --> <!ATTLIST INPUT %attrs; -- %coreattrs, %i18n, %events -- type %InputType; TEXT -- what kind of widget is needed -- name CDATA #IMPLIED -- submit as part of form -- value CDATA #IMPLIED -- Specify for radio buttons and checkboxes -- checked (checked) #IMPLIED -- for radio buttons and check boxes -- disabled (disabled) #IMPLIED -- unavailable in this context -- readonly (readonly) #IMPLIED -- for text and passwd -- size CDATA #IMPLIED -- specific to each type of field -- maxlength NUMBER #IMPLIED -- max chars for text fields -- src %URI; #IMPLIED -- for fields with images -- alt CDATA #IMPLIED -- short description -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- %reserved; -- reserved for possible future use -- > <!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector --> <!ATTLIST SELECT %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED -- field name -- size NUMBER #IMPLIED -- rows visible -- multiple (multiple) #IMPLIED -- default is single selection -- disabled (disabled) #IMPLIED -- unavailable in this context -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onchange %Script; #IMPLIED -- the element value was changed -- %reserved; -- reserved for possible future use -- > <!ELEMENT OPTGROUP - - (OPTION)+ -- option group --> <!ATTLIST OPTGROUP %attrs; -- %coreattrs, %i18n, %events -- disabled (disabled) #IMPLIED -- unavailable in this context -- label %Text; #REQUIRED -- for use in hierarchical menus -- > <!ELEMENT OPTION - O (#PCDATA) -- selectable choice --> <!ATTLIST OPTION %attrs; -- %coreattrs, %i18n, %events -- selected (selected) #IMPLIED disabled (disabled) #IMPLIED -- unavailable in this context -- label %Text; #IMPLIED -- for use in hierarchical menus -- value CDATA #IMPLIED -- defaults to element content -- > <!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field --> <!ATTLIST TEXTAREA %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED rows NUMBER #REQUIRED cols NUMBER #REQUIRED disabled (disabled) #IMPLIED -- unavailable in this context -- readonly (readonly) #IMPLIED tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- %reserved; -- reserved for possible future use -- > <!-- #PCDATA is to solve the mixed content problem, per specification only whitespace is allowed there! --> <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group --> <!ATTLIST FIELDSET %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT LEGEND - - (%inline;)* -- fieldset legend --> <!ATTLIST LEGEND %attrs; -- %coreattrs, %i18n, %events -- accesskey %Character; #IMPLIED -- accessibility key character -- > <!ELEMENT BUTTON - - (%flow;)* -(A|%formctrl;|FORM|FIELDSET) -- push button --> <!ATTLIST BUTTON %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED value CDATA #IMPLIED -- sent to server when submitted -- type (button|submit|reset) submit -- for use as form button -- disabled (disabled) #IMPLIED -- unavailable in this context -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- %reserved; -- reserved for possible future use -- > <!--======================= Tables =======================================--> <!-- IETF HTML table standard, see [RFC1942] --> <!-- The BORDER attribute sets the thickness of the frame around the table. The default units are screen pixels. The FRAME attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the VALIGN attribute. The value "border" is included for backwards compatibility with <TABLE BORDER> which yields frame=border and border=implied For <TABLE BORDER=1> you get border=1 and frame=implied. In this case, it is appropriate to treat this as frame=border for backwards compatibility with deployed browsers. --> <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> <!-- The RULES attribute defines which rules to draw between cells: If RULES is absent then assume: "none" if BORDER is absent or BORDER=0 otherwise "all" --> <!ENTITY % TRules "(none | groups | rows | cols | all)"> <!-- horizontal placement of table relative to document --> <!ENTITY % TAlign "(left|center|right)"> <!-- horizontal alignment attributes for cell contents --> <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED char %Character; #IMPLIED -- alignment char, e.g. char=':' -- charoff %Length; #IMPLIED -- offset for alignment char --" > <!-- vertical alignment attributes for cell contents --> <!ENTITY % cellvalign "valign (top|middle|bottom|baseline) #IMPLIED" > <!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)> <!ELEMENT CAPTION - - (%inline;)* -- table caption --> <!ELEMENT THEAD - O (TR)+ -- table header --> <!ELEMENT TFOOT - O (TR)+ -- table footer --> <!ELEMENT TBODY O O (TR)+ -- table body --> <!ELEMENT COLGROUP - O (COL)* -- table column group --> <!ELEMENT COL - O EMPTY -- table column --> <!ELEMENT TR - O (TH|TD)+ -- table row --> <!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell--> <!ATTLIST TABLE -- table element -- %attrs; -- %coreattrs, %i18n, %events -- summary %Text; #IMPLIED -- purpose/structure for speech output-- width %Length; #IMPLIED -- table width -- border %Pixels; #IMPLIED -- controls frame width around table -- frame %TFrame; #IMPLIED -- which parts of frame to render -- rules %TRules; #IMPLIED -- rulings between rows and cols -- cellspacing %Length; #IMPLIED -- spacing between cells -- cellpadding %Length; #IMPLIED -- spacing within cells -- %reserved; -- reserved for possible future use -- datapagesize CDATA #IMPLIED -- reserved for possible future use -- > <!ATTLIST CAPTION %attrs; -- %coreattrs, %i18n, %events -- > <!-- COLGROUP groups a set of COL elements. It allows you to group several semantically related columns together. --> <!ATTLIST COLGROUP %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- default number of columns in group -- width %MultiLength; #IMPLIED -- default width for enclosed COLs -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- COL elements define the alignment properties for cells in one or more columns. The WIDTH attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The SPAN attribute causes the attributes of one COL element to apply to more than one column. --> <!ATTLIST COL -- column groups and properties -- %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- COL attributes affect N columns -- width %MultiLength; #IMPLIED -- column width specification -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- Use THEAD to duplicate headers when breaking table across page boundaries, or for static headers when TBODY sections are rendered in scrolling panel. Use TFOOT to duplicate footers when breaking table across page boundaries, or for static footers when TBODY sections are rendered in scrolling panel. Use multiple TBODY sections when rules are needed between groups of table rows. --> <!ATTLIST (THEAD|TBODY|TFOOT) -- table section -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!ATTLIST TR -- table row -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- Scope is simpler than headers attribute for common tables --> <!ENTITY % Scope "(row|col|rowgroup|colgroup)"> <!-- TH is for headers, TD for data, but for cells acting as both use TD --> <!ATTLIST (TH|TD) -- header or data cell -- %attrs; -- %coreattrs, %i18n, %events -- abbr %Text; #IMPLIED -- abbreviation for header cell -- axis CDATA #IMPLIED -- comma-separated list of related headers-- headers IDREFS #IMPLIED -- list of id's for header cells -- scope %Scope; #IMPLIED -- scope covered by header cells -- rowspan NUMBER 1 -- number of rows spanned by cell -- colspan NUMBER 1 -- number of cols spanned by cell -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!--================ Document Head =======================================--> <!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" --> <!ENTITY % head.content "TITLE & BASE?"> <!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head --> <!ATTLIST HEAD %i18n; -- lang, dir -- profile %URI; #IMPLIED -- named dictionary of meta info -- > <!-- The TITLE element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. --> <!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title --> <!ATTLIST TITLE %i18n> <!ELEMENT BASE - O EMPTY -- document base URI --> <!ATTLIST BASE href %URI; #REQUIRED -- URI that acts as base URI -- > <!ELEMENT META - O EMPTY -- generic metainformation --> <!ATTLIST META %i18n; -- lang, dir, for use with content -- http-equiv NAME #IMPLIED -- HTTP response header name -- name NAME #IMPLIED -- metainformation name -- content CDATA #REQUIRED -- associated information -- scheme CDATA #IMPLIED -- select form of content -- > <!ELEMENT STYLE - - %StyleSheet -- style info --> <!ATTLIST STYLE %i18n; -- lang, dir, for use with title -- type %ContentType; #REQUIRED -- content type of style language -- media %MediaDesc; #IMPLIED -- designed for use with these media -- title %Text; #IMPLIED -- advisory title -- > <!ELEMENT SCRIPT - - %Script; -- script statements --> <!ATTLIST SCRIPT charset %Charset; #IMPLIED -- char encoding of linked resource -- type %ContentType; #REQUIRED -- content type of script language -- src %URI; #IMPLIED -- URI for an external script -- defer (defer) #IMPLIED -- UA may defer execution of script -- event CDATA #IMPLIED -- reserved for possible future use -- for %URI; #IMPLIED -- reserved for possible future use -- > <!ELEMENT NOSCRIPT - - (%block;)+ -- alternate content container for non script-based rendering --> <!ATTLIST NOSCRIPT %attrs; -- %coreattrs, %i18n, %events -- > <!--================ Document Structure ==================================--> <!ENTITY % html.content "HEAD, BODY"> <!ELEMENT HTML O O (%html.content;) -- document root element --> <!ATTLIST HTML %i18n; -- lang, dir -- >
HTML 4.01 Transitional DTD 文件内容:
<!-- This is the HTML 4.01 Transitional DTD, which includes presentation attributes and elements that W3C expects to phase out as support for style sheets matures. Authors should use the Strict DTD when possible, but may use the Transitional DTD when support for presentation attribute and elements is required. HTML 4 includes mechanisms for style sheets, scripting, embedding objects, improved support for right to left and mixed direction text, and enhancements to forms for improved accessibility for people with disabilities. Draft: $Date: 1999/12/24 23:37:48 $ Authors: Dave Raggett <dsr@w3.org> Arnaud Le Hors <lehors@w3.org> Ian Jacobs <ij@w3.org> Further information about HTML 4.01 is available at: http://www.w3.org/TR/1999/REC-html401-19991224 The HTML 4.01 specification includes additional syntactic constraints that cannot be expressed within the DTDs. --> <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Transitional//EN" -- Typical usage: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> ... </head> <body> ... </body> </html> The URI used as a system identifier with the public identifier allows the user agent to download the DTD and entity sets as needed. The FPI for the Strict HTML 4.01 DTD is: "-//W3C//DTD HTML 4.01//EN" This version of the strict DTD is: http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd Authors should use the Strict DTD unless they need the presentation control for user agents that don't (adequately) support style sheets. If you are writing a document that includes frames, use the following FPI: "-//W3C//DTD HTML 4.01 Frameset//EN" This version of the frameset DTD is: http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd Use the following (relative) URIs to refer to the DTDs and entity definitions of this specification: "strict.dtd" "loose.dtd" "frameset.dtd" "HTMLlat1.ent" "HTMLsymbol.ent" "HTMLspecial.ent" --> <!--================== Imported Names ====================================--> <!-- Feature Switch for frameset documents --> <!ENTITY % HTML.Frameset "IGNORE"> <!ENTITY % ContentType "CDATA" -- media type, as per [RFC2045] --> <!ENTITY % ContentTypes "CDATA" -- comma-separated list of media types, as per [RFC2045] --> <!ENTITY % Charset "CDATA" -- a character encoding, as per [RFC2045] --> <!ENTITY % Charsets "CDATA" -- a space-separated list of character encodings, as per [RFC2045] --> <!ENTITY % LanguageCode "NAME" -- a language code, as per [RFC1766] --> <!ENTITY % Character "CDATA" -- a single character from [ISO10646] --> <!ENTITY % LinkTypes "CDATA" -- space-separated list of link types --> <!ENTITY % MediaDesc "CDATA" -- single or comma-separated list of media descriptors --> <!ENTITY % URI "CDATA" -- a Uniform Resource Identifier, see [URI] --> <!ENTITY % Datetime "CDATA" -- date and time information. ISO date format --> <!ENTITY % Script "CDATA" -- script expression --> <!ENTITY % StyleSheet "CDATA" -- style sheet data --> <!ENTITY % FrameTarget "CDATA" -- render in this frame --> <!ENTITY % Text "CDATA"> <!-- Parameter Entities --> <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements --> <!ENTITY % heading "H1|H2|H3|H4|H5|H6"> <!ENTITY % list "UL | OL | DIR | MENU"> <!ENTITY % preformatted "PRE"> <!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values --> <!-- There are also 16 widely known color names with their sRGB values: Black = #000000 Green = #008000 Silver = #C0C0C0 Lime = #00FF00 Gray = #808080 Olive = #808000 White = #FFFFFF Yellow = #FFFF00 Maroon = #800000 Navy = #000080 Red = #FF0000 Blue = #0000FF Purple = #800080 Teal = #008080 Fuchsia= #FF00FF Aqua = #00FFFF --> <!ENTITY % bodycolors " bgcolor %Color; #IMPLIED -- document background color -- text %Color; #IMPLIED -- document text color -- link %Color; #IMPLIED -- color of links -- vlink %Color; #IMPLIED -- color of visited links -- alink %Color; #IMPLIED -- color of selected links -- "> <!--================ Character mnemonic entities =========================--> <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" "HTMLlat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols//EN//HTML" "HTMLsymbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special//EN//HTML" "HTMLspecial.ent"> %HTMLspecial; <!--=================== Generic Attributes ===============================--> <!ENTITY % coreattrs "id ID #IMPLIED -- document-wide unique id -- class CDATA #IMPLIED -- space-separated list of classes -- style %StyleSheet; #IMPLIED -- associated style info -- title %Text; #IMPLIED -- advisory title --" > <!ENTITY % i18n "lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --" > <!ENTITY % events "onclick %Script; #IMPLIED -- a pointer button was clicked -- ondblclick %Script; #IMPLIED -- a pointer button was double clicked-- onmousedown %Script; #IMPLIED -- a pointer button was pressed down -- onmouseup %Script; #IMPLIED -- a pointer button was released -- onmouseover %Script; #IMPLIED -- a pointer was moved onto -- onmousemove %Script; #IMPLIED -- a pointer was moved within -- onmouseout %Script; #IMPLIED -- a pointer was moved away -- onkeypress %Script; #IMPLIED -- a key was pressed and released -- onkeydown %Script; #IMPLIED -- a key was pressed down -- onkeyup %Script; #IMPLIED -- a key was released --" > <!-- Reserved Feature Switch --> <!ENTITY % HTML.Reserved "IGNORE"> <!-- The following attributes are reserved for possible future use --> <![ %HTML.Reserved; [ <!ENTITY % reserved "datasrc %URI; #IMPLIED -- a single or tabular Data Source -- datafld CDATA #IMPLIED -- the property or column name -- dataformatas (plaintext|html) plaintext -- text or html --" > ]]> <!ENTITY % reserved ""> <!ENTITY % attrs "%coreattrs; %i18n; %events;"> <!ENTITY % align "align (left|center|right|justify) #IMPLIED" -- default is left for ltr paragraphs, right for rtl -- > <!--=================== Text Markup ======================================--> <!ENTITY % fontstyle "TT | I | B | U | S | STRIKE | BIG | SMALL"> <!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM" > <!ENTITY % special "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO | IFRAME"> <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> <!-- %inline; covers inline or "text-level" elements --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> <!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*> <!ATTLIST (%fontstyle;|%phrase;) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> <!ATTLIST (SUB|SUP) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT SPAN - - (%inline;)* -- generic language/style container --> <!ATTLIST SPAN %attrs; -- %coreattrs, %i18n, %events -- %reserved; -- reserved for possible future use -- > <!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride --> <!ATTLIST BDO %coreattrs; -- id, class, style, title -- lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #REQUIRED -- directionality -- > <!ELEMENT BASEFONT - O EMPTY -- base font size --> <!ATTLIST BASEFONT id ID #IMPLIED -- document-wide unique id -- size CDATA #REQUIRED -- base font size for FONT elements -- color %Color; #IMPLIED -- text color -- face CDATA #IMPLIED -- comma-separated list of font names -- > <!ELEMENT FONT - - (%inline;)* -- local change to font --> <!ATTLIST FONT %coreattrs; -- id, class, style, title -- %i18n; -- lang, dir -- size CDATA #IMPLIED -- [+|-]nn e.g. size="+1", size="4" -- color %Color; #IMPLIED -- text color -- face CDATA #IMPLIED -- comma-separated list of font names -- > <!ELEMENT BR - O EMPTY -- forced line break --> <!ATTLIST BR %coreattrs; -- id, class, style, title -- clear (left|all|right|none) none -- control of text flow -- > <!--================== HTML content models ===============================--> <!-- HTML has two basic content models: %inline; character level elements and text strings %block; block-like elements e.g. paragraphs and lists --> <!ENTITY % block "P | %heading; | %list; | %preformatted; | DL | DIV | CENTER | NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR | TABLE | FIELDSET | ADDRESS"> <!ENTITY % flow "%block; | %inline;"> <!--=================== Document Body ====================================--> <!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body --> <!ATTLIST BODY %attrs; -- %coreattrs, %i18n, %events -- onload %Script; #IMPLIED -- the document has been loaded -- onunload %Script; #IMPLIED -- the document has been removed -- background %URI; #IMPLIED -- texture tile for document background -- %bodycolors; -- bgcolor, text, link, vlink, alink -- > <!ELEMENT ADDRESS - - ((%inline;)|P)* -- information on author --> <!ATTLIST ADDRESS %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ATTLIST DIV %attrs; -- %coreattrs, %i18n, %events -- %align; -- align, text alignment -- %reserved; -- reserved for possible future use -- > <!ELEMENT CENTER - - (%flow;)* -- shorthand for DIV align=center --> <!ATTLIST CENTER %attrs; -- %coreattrs, %i18n, %events -- > <!--================== The Anchor Element ================================--> <!ENTITY % Shape "(rect|circle|poly|default)"> <!ENTITY % Coords "CDATA" -- comma-separated list of lengths --> <!ELEMENT A - - (%inline;)* -(A) -- anchor --> <!ATTLIST A %attrs; -- %coreattrs, %i18n, %events -- charset %Charset; #IMPLIED -- char encoding of linked resource -- type %ContentType; #IMPLIED -- advisory content type -- name CDATA #IMPLIED -- named link end -- href %URI; #IMPLIED -- URI for linked resource -- hreflang %LanguageCode; #IMPLIED -- language code -- target %FrameTarget; #IMPLIED -- render in this frame -- rel %LinkTypes; #IMPLIED -- forward link types -- rev %LinkTypes; #IMPLIED -- reverse link types -- accesskey %Character; #IMPLIED -- accessibility key character -- shape %Shape; rect -- for use with client-side image maps -- coords %Coords; #IMPLIED -- for use with client-side image maps -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!--================== Client-side image maps ============================--> <!-- These can be placed in the same document or grouped in a separate document although this isn't yet widely supported --> <!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map --> <!ATTLIST MAP %attrs; -- %coreattrs, %i18n, %events -- name CDATA #REQUIRED -- for reference by usemap -- > <!ELEMENT AREA - O EMPTY -- client-side image map area --> <!ATTLIST AREA %attrs; -- %coreattrs, %i18n, %events -- shape %Shape; rect -- controls interpretation of coords -- coords %Coords; #IMPLIED -- comma-separated list of lengths -- href %URI; #IMPLIED -- URI for linked resource -- target %FrameTarget; #IMPLIED -- render in this frame -- nohref (nohref) #IMPLIED -- this region has no action -- alt %Text; #REQUIRED -- short description -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!--================== The LINK Element ==================================--> <!-- Relationship values can be used in principle: a) for document specific toolbars/menus when used with the LINK element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel=stylesheet) c) to make a link to a script (rel=script) d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a postscript or pdf version (rel=alternate media=print) --> <!ELEMENT LINK - O EMPTY -- a media-independent link --> <!ATTLIST LINK %attrs; -- %coreattrs, %i18n, %events -- charset %Charset; #IMPLIED -- char encoding of linked resource -- href %URI; #IMPLIED -- URI for linked resource -- hreflang %LanguageCode; #IMPLIED -- language code -- type %ContentType; #IMPLIED -- advisory content type -- rel %LinkTypes; #IMPLIED -- forward link types -- rev %LinkTypes; #IMPLIED -- reverse link types -- media %MediaDesc; #IMPLIED -- for rendering on these media -- target %FrameTarget; #IMPLIED -- render in this frame -- > <!--=================== Images ===========================================--> <!-- Length defined in strict DTD for cellpadding/cellspacing --> <!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length --> <!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative --> <![ %HTML.Frameset; [ <!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength --> ]]> <!ENTITY % Pixels "CDATA" -- integer representing length in pixels --> <!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? --> <!-- To avoid problems with text-only UAs as well as to make image content understandable and navigable to users of non-visual UAs, you need to provide a description with ALT, and avoid server-side image maps --> <!ELEMENT IMG - O EMPTY -- Embedded image --> <!ATTLIST IMG %attrs; -- %coreattrs, %i18n, %events -- src %URI; #REQUIRED -- URI of image to embed -- alt %Text; #REQUIRED -- short description -- longdesc %URI; #IMPLIED -- link to long description (complements alt) -- name CDATA #IMPLIED -- name of image for scripting -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- border %Pixels; #IMPLIED -- link border width -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- > <!-- USEMAP points to a MAP element which may be in this document or an external document, although the latter is not widely supported --> <!--==================== OBJECT ======================================--> <!-- OBJECT is used to embed objects as part of HTML pages PARAM elements should precede other content. SGML mixed content model technicality precludes specifying this formally ... --> <!ELEMENT OBJECT - - (PARAM | %flow;)* -- generic embedded object --> <!ATTLIST OBJECT %attrs; -- %coreattrs, %i18n, %events -- declare (declare) #IMPLIED -- declare but don't instantiate flag -- classid %URI; #IMPLIED -- identifies an implementation -- codebase %URI; #IMPLIED -- base URI for classid, data, archive-- data %URI; #IMPLIED -- reference to object's data -- type %ContentType; #IMPLIED -- content type for data -- codetype %ContentType; #IMPLIED -- content type for code -- archive CDATA #IMPLIED -- space-separated list of URIs -- standby %Text; #IMPLIED -- message to show while loading -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- name CDATA #IMPLIED -- submit as part of form -- tabindex NUMBER #IMPLIED -- position in tabbing order -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- border %Pixels; #IMPLIED -- link border width -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- %reserved; -- reserved for possible future use -- > <!ELEMENT PARAM - O EMPTY -- named property value --> <!ATTLIST PARAM id ID #IMPLIED -- document-wide unique id -- name CDATA #REQUIRED -- property name -- value CDATA #IMPLIED -- property value -- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value -- type %ContentType; #IMPLIED -- content type for value when valuetype=ref -- > <!--=================== Java APPLET ==================================--> <!-- One of code or object attributes must be present. Place PARAM elements before other content. --> <!ELEMENT APPLET - - (PARAM | %flow;)* -- Java applet --> <!ATTLIST APPLET %coreattrs; -- id, class, style, title -- codebase %URI; #IMPLIED -- optional base URI for applet -- archive CDATA #IMPLIED -- comma-separated archive list -- code CDATA #IMPLIED -- applet class file -- object CDATA #IMPLIED -- serialized applet file -- alt %Text; #IMPLIED -- short description -- name CDATA #IMPLIED -- allows applets to find each other -- width %Length; #REQUIRED -- initial width -- height %Length; #REQUIRED -- initial height -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- > <!--=================== Horizontal Rule ==================================--> <!ELEMENT HR - O EMPTY -- horizontal rule --> <!ATTLIST HR %attrs; -- %coreattrs, %i18n, %events -- align (left|center|right) #IMPLIED noshade (noshade) #IMPLIED size %Pixels; #IMPLIED width %Length; #IMPLIED > <!--=================== Paragraphs =======================================--> <!ELEMENT P - O (%inline;)* -- paragraph --> <!ATTLIST P %attrs; -- %coreattrs, %i18n, %events -- %align; -- align, text alignment -- > <!--=================== Headings =========================================--> <!-- There are six levels of headings from H1 (the most important) to H6 (the least important). --> <!ELEMENT (%heading;) - - (%inline;)* -- heading --> <!ATTLIST (%heading;) %attrs; -- %coreattrs, %i18n, %events -- %align; -- align, text alignment -- > <!--=================== Preformatted Text ================================--> <!-- excludes markup for images and changes in font size --> <!ENTITY % pre.exclusion "IMG|OBJECT|APPLET|BIG|SMALL|SUB|SUP|FONT|BASEFONT"> <!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text --> <!ATTLIST PRE %attrs; -- %coreattrs, %i18n, %events -- width NUMBER #IMPLIED > <!--===================== Inline Quotes ==================================--> <!ELEMENT Q - - (%inline;)* -- short inline quotation --> <!ATTLIST Q %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > <!--=================== Block-like Quotes ================================--> <!ELEMENT BLOCKQUOTE - - (%flow;)* -- long quotation --> <!ATTLIST BLOCKQUOTE %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > <!--=================== Inserted/Deleted Text ============================--> <!-- INS/DEL are handled by inclusion on BODY --> <!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text --> <!ATTLIST (INS|DEL) %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- info on reason for change -- datetime %Datetime; #IMPLIED -- date and time of change -- > <!--=================== Lists ============================================--> <!-- definition lists - DT for term, DD for its definition --> <!ELEMENT DL - - (DT|DD)+ -- definition list --> <!ATTLIST DL %attrs; -- %coreattrs, %i18n, %events -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ELEMENT DT - O (%inline;)* -- definition term --> <!ELEMENT DD - O (%flow;)* -- definition description --> <!ATTLIST (DT|DD) %attrs; -- %coreattrs, %i18n, %events -- > <!-- Ordered lists (OL) Numbering style 1 arablic numbers 1, 2, 3, ... a lower alpha a, b, c, ... A upper alpha A, B, C, ... i lower roman i, ii, iii, ... I upper roman I, II, III, ... The style is applied to the sequence number which by default is reset to 1 for the first list item in an ordered list. This can't be expressed directly in SGML due to case folding. --> <!ENTITY % OLStyle "CDATA" -- constrained to: "(1|a|A|i|I)" --> <!ELEMENT OL - - (LI)+ -- ordered list --> <!ATTLIST OL %attrs; -- %coreattrs, %i18n, %events -- type %OLStyle; #IMPLIED -- numbering style -- compact (compact) #IMPLIED -- reduced interitem spacing -- start NUMBER #IMPLIED -- starting sequence number -- > <!-- Unordered Lists (UL) bullet styles --> <!ENTITY % ULStyle "(disc|square|circle)"> <!ELEMENT UL - - (LI)+ -- unordered list --> <!ATTLIST UL %attrs; -- %coreattrs, %i18n, %events -- type %ULStyle; #IMPLIED -- bullet style -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu list --> <!ATTLIST DIR %attrs; -- %coreattrs, %i18n, %events -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ATTLIST MENU %attrs; -- %coreattrs, %i18n, %events -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle;|%OLStyle;)" --> <!ELEMENT LI - O (%flow;)* -- list item --> <!ATTLIST LI %attrs; -- %coreattrs, %i18n, %events -- type %LIStyle; #IMPLIED -- list item style -- value NUMBER #IMPLIED -- reset sequence number -- > <!--================ Forms ===============================================--> <!ELEMENT FORM - - (%flow;)* -(FORM) -- interactive form --> <!ATTLIST FORM %attrs; -- %coreattrs, %i18n, %events -- action %URI; #REQUIRED -- server-side form handler -- method (GET|POST) GET -- HTTP method used to submit the form-- enctype %ContentType; "application/x-www-form-urlencoded" accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- name CDATA #IMPLIED -- name of form for scripting -- onsubmit %Script; #IMPLIED -- the form was submitted -- onreset %Script; #IMPLIED -- the form was reset -- target %FrameTarget; #IMPLIED -- render in this frame -- accept-charset %Charsets; #IMPLIED -- list of supported charsets -- > <!-- Each label must not contain more than ONE field --> <!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text --> <!ATTLIST LABEL %attrs; -- %coreattrs, %i18n, %events -- for IDREF #IMPLIED -- matches field ID value -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT | RESET | FILE | HIDDEN | IMAGE | BUTTON)" > <!-- attribute name required for all but submit and reset --> <!ELEMENT INPUT - O EMPTY -- form control --> <!ATTLIST INPUT %attrs; -- %coreattrs, %i18n, %events -- type %InputType; TEXT -- what kind of widget is needed -- name CDATA #IMPLIED -- submit as part of form -- value CDATA #IMPLIED -- Specify for radio buttons and checkboxes -- checked (checked) #IMPLIED -- for radio buttons and check boxes -- disabled (disabled) #IMPLIED -- unavailable in this context -- readonly (readonly) #IMPLIED -- for text and passwd -- size CDATA #IMPLIED -- specific to each type of field -- maxlength NUMBER #IMPLIED -- max chars for text fields -- src %URI; #IMPLIED -- for fields with images -- alt CDATA #IMPLIED -- short description -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- %reserved; -- reserved for possible future use -- > <!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector --> <!ATTLIST SELECT %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED -- field name -- size NUMBER #IMPLIED -- rows visible -- multiple (multiple) #IMPLIED -- default is single selection -- disabled (disabled) #IMPLIED -- unavailable in this context -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onchange %Script; #IMPLIED -- the element value was changed -- %reserved; -- reserved for possible future use -- > <!ELEMENT OPTGROUP - - (OPTION)+ -- option group --> <!ATTLIST OPTGROUP %attrs; -- %coreattrs, %i18n, %events -- disabled (disabled) #IMPLIED -- unavailable in this context -- label %Text; #REQUIRED -- for use in hierarchical menus -- > <!ELEMENT OPTION - O (#PCDATA) -- selectable choice --> <!ATTLIST OPTION %attrs; -- %coreattrs, %i18n, %events -- selected (selected) #IMPLIED disabled (disabled) #IMPLIED -- unavailable in this context -- label %Text; #IMPLIED -- for use in hierarchical menus -- value CDATA #IMPLIED -- defaults to element content -- > <!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field --> <!ATTLIST TEXTAREA %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED rows NUMBER #REQUIRED cols NUMBER #REQUIRED disabled (disabled) #IMPLIED -- unavailable in this context -- readonly (readonly) #IMPLIED tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- %reserved; -- reserved for possible future use -- > <!-- #PCDATA is to solve the mixed content problem, per specification only whitespace is allowed there! --> <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group --> <!ATTLIST FIELDSET %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT LEGEND - - (%inline;)* -- fieldset legend --> <!ENTITY % LAlign "(top|bottom|left|right)"> <!ATTLIST LEGEND %attrs; -- %coreattrs, %i18n, %events -- accesskey %Character; #IMPLIED -- accessibility key character -- align %LAlign; #IMPLIED -- relative to fieldset -- > <!ELEMENT BUTTON - - (%flow;)* -(A|%formctrl;|FORM|ISINDEX|FIELDSET|IFRAME) -- push button --> <!ATTLIST BUTTON %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED value CDATA #IMPLIED -- sent to server when submitted -- type (button|submit|reset) submit -- for use as form button -- disabled (disabled) #IMPLIED -- unavailable in this context -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- %reserved; -- reserved for possible future use -- > <!--======================= Tables =======================================--> <!-- IETF HTML table standard, see [RFC1942] --> <!-- The BORDER attribute sets the thickness of the frame around the table. The default units are screen pixels. The FRAME attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the VALIGN attribute. The value "border" is included for backwards compatibility with <TABLE BORDER> which yields frame=border and border=implied For <TABLE BORDER=1> you get border=1 and frame=implied. In this case, it is appropriate to treat this as frame=border for backwards compatibility with deployed browsers. --> <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> <!-- The RULES attribute defines which rules to draw between cells: If RULES is absent then assume: "none" if BORDER is absent or BORDER=0 otherwise "all" --> <!ENTITY % TRules "(none | groups | rows | cols | all)"> <!-- horizontal placement of table relative to document --> <!ENTITY % TAlign "(left|center|right)"> <!-- horizontal alignment attributes for cell contents --> <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED char %Character; #IMPLIED -- alignment char, e.g. char=':' -- charoff %Length; #IMPLIED -- offset for alignment char --" > <!-- vertical alignment attributes for cell contents --> <!ENTITY % cellvalign "valign (top|middle|bottom|baseline) #IMPLIED" > <!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)> <!ELEMENT CAPTION - - (%inline;)* -- table caption --> <!ELEMENT THEAD - O (TR)+ -- table header --> <!ELEMENT TFOOT - O (TR)+ -- table footer --> <!ELEMENT TBODY O O (TR)+ -- table body --> <!ELEMENT COLGROUP - O (COL)* -- table column group --> <!ELEMENT COL - O EMPTY -- table column --> <!ELEMENT TR - O (TH|TD)+ -- table row --> <!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell--> <!ATTLIST TABLE -- table element -- %attrs; -- %coreattrs, %i18n, %events -- summary %Text; #IMPLIED -- purpose/structure for speech output-- width %Length; #IMPLIED -- table width -- border %Pixels; #IMPLIED -- controls frame width around table -- frame %TFrame; #IMPLIED -- which parts of frame to render -- rules %TRules; #IMPLIED -- rulings between rows and cols -- cellspacing %Length; #IMPLIED -- spacing between cells -- cellpadding %Length; #IMPLIED -- spacing within cells -- align %TAlign; #IMPLIED -- table position relative to window -- bgcolor %Color; #IMPLIED -- background color for cells -- %reserved; -- reserved for possible future use -- datapagesize CDATA #IMPLIED -- reserved for possible future use -- > <!ENTITY % CAlign "(top|bottom|left|right)"> <!ATTLIST CAPTION %attrs; -- %coreattrs, %i18n, %events -- align %CAlign; #IMPLIED -- relative to table -- > <!-- COLGROUP groups a set of COL elements. It allows you to group several semantically related columns together. --> <!ATTLIST COLGROUP %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- default number of columns in group -- width %MultiLength; #IMPLIED -- default width for enclosed COLs -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- COL elements define the alignment properties for cells in one or more columns. The WIDTH attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The SPAN attribute causes the attributes of one COL element to apply to more than one column. --> <!ATTLIST COL -- column groups and properties -- %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- COL attributes affect N columns -- width %MultiLength; #IMPLIED -- column width specification -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- Use THEAD to duplicate headers when breaking table across page boundaries, or for static headers when TBODY sections are rendered in scrolling panel. Use TFOOT to duplicate footers when breaking table across page boundaries, or for static footers when TBODY sections are rendered in scrolling panel. Use multiple TBODY sections when rules are needed between groups of table rows. --> <!ATTLIST (THEAD|TBODY|TFOOT) -- table section -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!ATTLIST TR -- table row -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- bgcolor %Color; #IMPLIED -- background color for row -- > <!-- Scope is simpler than headers attribute for common tables --> <!ENTITY % Scope "(row|col|rowgroup|colgroup)"> <!-- TH is for headers, TD for data, but for cells acting as both use TD --> <!ATTLIST (TH|TD) -- header or data cell -- %attrs; -- %coreattrs, %i18n, %events -- abbr %Text; #IMPLIED -- abbreviation for header cell -- axis CDATA #IMPLIED -- comma-separated list of related headers-- headers IDREFS #IMPLIED -- list of id's for header cells -- scope %Scope; #IMPLIED -- scope covered by header cells -- rowspan NUMBER 1 -- number of rows spanned by cell -- colspan NUMBER 1 -- number of cols spanned by cell -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- nowrap (nowrap) #IMPLIED -- suppress word wrap -- bgcolor %Color; #IMPLIED -- cell background color -- width %Length; #IMPLIED -- width for cell -- height %Length; #IMPLIED -- height for cell -- > <!--================== Document Frames ===================================--> <!-- The content model for HTML documents depends on whether the HEAD is followed by a FRAMESET or BODY element. The widespread omission of the BODY start tag makes it impractical to define the content model without the use of a marked section. --> <![ %HTML.Frameset; [ <!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision--> <!ATTLIST FRAMESET %coreattrs; -- id, class, style, title -- rows %MultiLengths; #IMPLIED -- list of lengths, default: 100% (1 row) -- cols %MultiLengths; #IMPLIED -- list of lengths, default: 100% (1 col) -- onload %Script; #IMPLIED -- all the frames have been loaded -- onunload %Script; #IMPLIED -- all the frames have been removed -- > ]]> <![ %HTML.Frameset; [ <!-- reserved frame names start with "_" otherwise starts with letter --> <!ELEMENT FRAME - O EMPTY -- subwindow --> <!ATTLIST FRAME %coreattrs; -- id, class, style, title -- longdesc %URI; #IMPLIED -- link to long description (complements title) -- name CDATA #IMPLIED -- name of frame for targetting -- src %URI; #IMPLIED -- source of frame content -- frameborder (1|0) 1 -- request frame borders? -- marginwidth %Pixels; #IMPLIED -- margin widths in pixels -- marginheight %Pixels; #IMPLIED -- margin height in pixels -- noresize (noresize) #IMPLIED -- allow users to resize frames? -- scrolling (yes|no|auto) auto -- scrollbar or none -- > ]]> <!ELEMENT IFRAME - - (%flow;)* -- inline subwindow --> <!ATTLIST IFRAME %coreattrs; -- id, class, style, title -- longdesc %URI; #IMPLIED -- link to long description (complements title) -- name CDATA #IMPLIED -- name of frame for targetting -- src %URI; #IMPLIED -- source of frame content -- frameborder (1|0) 1 -- request frame borders? -- marginwidth %Pixels; #IMPLIED -- margin widths in pixels -- marginheight %Pixels; #IMPLIED -- margin height in pixels -- scrolling (yes|no|auto) auto -- scrollbar or none -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- height %Length; #IMPLIED -- frame height -- width %Length; #IMPLIED -- frame width -- > <![ %HTML.Frameset; [ <!ENTITY % noframes.content "(BODY) -(NOFRAMES)"> ]]> <!ENTITY % noframes.content "(%flow;)*"> <!ELEMENT NOFRAMES - - %noframes.content; -- alternate content container for non frame-based rendering --> <!ATTLIST NOFRAMES %attrs; -- %coreattrs, %i18n, %events -- > <!--================ Document Head =======================================--> <!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" --> <!ENTITY % head.content "TITLE & ISINDEX? & BASE?"> <!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head --> <!ATTLIST HEAD %i18n; -- lang, dir -- profile %URI; #IMPLIED -- named dictionary of meta info -- > <!-- The TITLE element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. --> <!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title --> <!ATTLIST TITLE %i18n> <!ELEMENT ISINDEX - O EMPTY -- single line prompt --> <!ATTLIST ISINDEX %coreattrs; -- id, class, style, title -- %i18n; -- lang, dir -- prompt %Text; #IMPLIED -- prompt message --> <!ELEMENT BASE - O EMPTY -- document base URI --> <!ATTLIST BASE href %URI; #IMPLIED -- URI that acts as base URI -- target %FrameTarget; #IMPLIED -- render in this frame -- > <!ELEMENT META - O EMPTY -- generic metainformation --> <!ATTLIST META %i18n; -- lang, dir, for use with content -- http-equiv NAME #IMPLIED -- HTTP response header name -- name NAME #IMPLIED -- metainformation name -- content CDATA #REQUIRED -- associated information -- scheme CDATA #IMPLIED -- select form of content -- > <!ELEMENT STYLE - - %StyleSheet -- style info --> <!ATTLIST STYLE %i18n; -- lang, dir, for use with title -- type %ContentType; #REQUIRED -- content type of style language -- media %MediaDesc; #IMPLIED -- designed for use with these media -- title %Text; #IMPLIED -- advisory title -- > <!ELEMENT SCRIPT - - %Script; -- script statements --> <!ATTLIST SCRIPT charset %Charset; #IMPLIED -- char encoding of linked resource -- type %ContentType; #REQUIRED -- content type of script language -- language CDATA #IMPLIED -- predefined script language name -- src %URI; #IMPLIED -- URI for an external script -- defer (defer) #IMPLIED -- UA may defer execution of script -- event CDATA #IMPLIED -- reserved for possible future use -- for %URI; #IMPLIED -- reserved for possible future use -- > <!ELEMENT NOSCRIPT - - (%flow;)* -- alternate content container for non script-based rendering --> <!ATTLIST NOSCRIPT %attrs; -- %coreattrs, %i18n, %events -- > <!--================ Document Structure ==================================--> <!ENTITY % version "version CDATA #FIXED '%HTML.Version;'"> <![ %HTML.Frameset; [ <!ENTITY % html.content "HEAD, FRAMESET"> ]]> <!ENTITY % html.content "HEAD, BODY"> <!ELEMENT HTML O O (%html.content;) -- document root element --> <!ATTLIST HTML %i18n; -- lang, dir -- %version; >
XHTML: Extensible HTML version 1.0 Strict DTD <!-- Extensible HTML version 1.0 Strict DTD This is the same as HTML 4 Strict except for changes due to the differences between XML and SGML. Namespace = http://www.w3.org/1999/xhtml For further information, see: http://www.w3.org/TR/xhtml1 Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio), All Rights Reserved. This DTD module is identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" $Revision: 1.1 $ $Date: 2002/08/01 13:56:03 $ --> <!--================ Character mnemonic entities =========================--> <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "xhtml-lat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "xhtml-symbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "xhtml-special.ent"> %HTMLspecial; <!--================== Imported Names ====================================--> <!ENTITY % ContentType "CDATA"> <!-- media type, as per [RFC2045] --> <!ENTITY % ContentTypes "CDATA"> <!-- comma-separated list of media types, as per [RFC2045] --> <!ENTITY % Charset "CDATA"> <!-- a character encoding, as per [RFC2045] --> <!ENTITY % Charsets "CDATA"> <!-- a space separated list of character encodings, as per [RFC2045] --> <!ENTITY % LanguageCode "NMTOKEN"> <!-- a language code, as per [RFC3066] --> <!ENTITY % Character "CDATA"> <!-- a single character, as per section 2.2 of [XML] --> <!ENTITY % Number "CDATA"> <!-- one or more digits --> <!ENTITY % LinkTypes "CDATA"> <!-- space-separated list of link types --> <!ENTITY % MediaDesc "CDATA"> <!-- single or comma-separated list of media descriptors --> <!ENTITY % URI "CDATA"> <!-- a Uniform Resource Identifier, see [RFC2396] --> <!ENTITY % UriList "CDATA"> <!-- a space separated list of Uniform Resource Identifiers --> <!ENTITY % Datetime "CDATA"> <!-- date and time information. ISO date format --> <!ENTITY % Script "CDATA"> <!-- script expression --> <!ENTITY % StyleSheet "CDATA"> <!-- style sheet data --> <!ENTITY % Text "CDATA"> <!-- used for titles etc. --> <!ENTITY % Length "CDATA"> <!-- nn for pixels or nn% for percentage length --> <!ENTITY % MultiLength "CDATA"> <!-- pixel, percentage, or relative --> <!ENTITY % Pixels "CDATA"> <!-- integer representing length in pixels --> <!-- these are used for image maps --> <!ENTITY % Shape "(rect|circle|poly|default)"> <!ENTITY % Coords "CDATA"> <!-- comma separated list of lengths --> <!--=================== Generic Attributes ===============================--> <!-- core attributes common to most elements id document-wide unique id class space separated list of classes style associated style info title advisory title/amplification --> <!ENTITY % coreattrs "id ID #IMPLIED class CDATA #IMPLIED style %StyleSheet; #IMPLIED title %Text; #IMPLIED" > <!-- internationalization attributes lang language code (backwards compatible) xml:lang language code (as per XML 1.0 spec) dir direction for weak/neutral text --> <!ENTITY % i18n "lang %LanguageCode; #IMPLIED xml:lang %LanguageCode; #IMPLIED dir (ltr|rtl) #IMPLIED" > <!-- attributes for common UI events onclick a pointer button was clicked ondblclick a pointer button was double clicked onmousedown a pointer button was pressed down onmouseup a pointer button was released onmousemove a pointer was moved onto the element onmouseout a pointer was moved away from the element onkeypress a key was pressed and released onkeydown a key was pressed down onkeyup a key was released --> <!ENTITY % events "onclick %Script; #IMPLIED ondblclick %Script; #IMPLIED onmousedown %Script; #IMPLIED onmouseup %Script; #IMPLIED onmouseover %Script; #IMPLIED onmousemove %Script; #IMPLIED onmouseout %Script; #IMPLIED onkeypress %Script; #IMPLIED onkeydown %Script; #IMPLIED onkeyup %Script; #IMPLIED" > <!-- attributes for elements that can get the focus accesskey accessibility key character tabindex position in tabbing order onfocus the element got the focus onblur the element lost the focus --> <!ENTITY % focus "accesskey %Character; #IMPLIED tabindex %Number; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED" > <!ENTITY % attrs "%coreattrs; %i18n; %events;"> <!--=================== Text Elements ====================================--> <!ENTITY % special.pre "br | span | bdo | map"> <!ENTITY % special "%special.pre; | object | img "> <!ENTITY % fontstyle "tt | i | b | big | small "> <!ENTITY % phrase "em | strong | dfn | code | q | samp | kbd | var | cite | abbr | acronym | sub | sup "> <!ENTITY % inline.forms "input | select | textarea | label | button"> <!-- these can occur at block or inline level --> <!ENTITY % misc.inline "ins | del | script"> <!-- these can only occur at block level --> <!ENTITY % misc "noscript | %misc.inline;"> <!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;"> <!-- %Inline; covers inline or "text-level" elements --> <!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*"> <!--================== Block level elements ==============================--> <!ENTITY % heading "h1|h2|h3|h4|h5|h6"> <!ENTITY % lists "ul | ol | dl"> <!ENTITY % blocktext "pre | hr | blockquote | address"> <!ENTITY % block "p | %heading; | div | %lists; | %blocktext; | fieldset | table"> <!ENTITY % Block "(%block; | form | %misc;)*"> <!-- %Flow; mixes block and inline and is used for list items etc. --> <!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*"> <!--================== Content models for exclusions =====================--> <!-- a elements use %Inline; excluding a --> <!ENTITY % a.content "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*"> <!-- pre uses %Inline excluding big, small, sup or sup --> <!ENTITY % pre.content "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline; | %inline.forms;)*"> <!-- form uses %Block; excluding form --> <!ENTITY % form.content "(%block; | %misc;)*"> <!-- button uses %Flow; but excludes a, form and form controls --> <!ENTITY % button.content "(#PCDATA | p | %heading; | div | %lists; | %blocktext; | table | %special; | %fontstyle; | %phrase; | %misc;)*"> <!--================ Document Structure ==================================--> <!-- the namespace URI designates the document profile --> <!ELEMENT html (head, body)> <!ATTLIST html %i18n; id ID #IMPLIED xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml' > <!--================ Document Head =======================================--> <!ENTITY % head.misc "(script|style|meta|link|object)*"> <!-- content model is %head.misc; combined with a single title and an optional base element in any order --> <!ELEMENT head (%head.misc;, ((title, %head.misc;, (base, %head.misc;)?) | (base, %head.misc;, (title, %head.misc;))))> <!ATTLIST head %i18n; id ID #IMPLIED profile %URI; #IMPLIED > <!-- The title element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. --> <!ELEMENT title (#PCDATA)> <!ATTLIST title %i18n; id ID #IMPLIED > <!-- document base URI --> <!ELEMENT base EMPTY> <!ATTLIST base href %URI; #REQUIRED id ID #IMPLIED > <!-- generic metainformation --> <!ELEMENT meta EMPTY> <!ATTLIST meta %i18n; id ID #IMPLIED http-equiv CDATA #IMPLIED name CDATA #IMPLIED content CDATA #REQUIRED scheme CDATA #IMPLIED > <!-- Relationship values can be used in principle: a) for document specific toolbars/menus when used with the link element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel="stylesheet") c) to make a link to a script (rel="script") d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a PostScript or PDF version (rel="alternate" media="print") --> <!ELEMENT link EMPTY> <!ATTLIST link %attrs; charset %Charset; #IMPLIED href %URI; #IMPLIED hreflang %LanguageCode; #IMPLIED type %ContentType; #IMPLIED rel %LinkTypes; #IMPLIED rev %LinkTypes; #IMPLIED media %MediaDesc; #IMPLIED > <!-- style info, which may include CDATA sections --> <!ELEMENT style (#PCDATA)> <!ATTLIST style %i18n; id ID #IMPLIED type %ContentType; #REQUIRED media %MediaDesc; #IMPLIED title %Text; #IMPLIED xml:space (preserve) #FIXED 'preserve' > <!-- script statements, which may include CDATA sections --> <!ELEMENT script (#PCDATA)> <!ATTLIST script id ID #IMPLIED charset %Charset; #IMPLIED type %ContentType; #REQUIRED src %URI; #IMPLIED defer (defer) #IMPLIED xml:space (preserve) #FIXED 'preserve' > <!-- alternate content container for non script-based rendering --> <!ELEMENT noscript %Block;> <!ATTLIST noscript %attrs; > <!--=================== Document Body ====================================--> <!ELEMENT body %Block;> <!ATTLIST body %attrs; onload %Script; #IMPLIED onunload %Script; #IMPLIED > <!ELEMENT div %Flow;> <!-- generic language/style container --> <!ATTLIST div %attrs; > <!--=================== Paragraphs =======================================--> <!ELEMENT p %Inline;> <!ATTLIST p %attrs; > <!--=================== Headings =========================================--> <!-- There are six levels of headings from h1 (the most important) to h6 (the least important). --> <!ELEMENT h1 %Inline;> <!ATTLIST h1 %attrs; > <!ELEMENT h2 %Inline;> <!ATTLIST h2 %attrs; > <!ELEMENT h3 %Inline;> <!ATTLIST h3 %attrs; > <!ELEMENT h4 %Inline;> <!ATTLIST h4 %attrs; > <!ELEMENT h5 %Inline;> <!ATTLIST h5 %attrs; > <!ELEMENT h6 %Inline;> <!ATTLIST h6 %attrs; > <!--=================== Lists ============================================--> <!-- Unordered list --> <!ELEMENT ul (li)+> <!ATTLIST ul %attrs; > <!-- Ordered (numbered) list --> <!ELEMENT ol (li)+> <!ATTLIST ol %attrs; > <!-- list item --> <!ELEMENT li %Flow;> <!ATTLIST li %attrs; > <!-- definition lists - dt for term, dd for its definition --> <!ELEMENT dl (dt|dd)+> <!ATTLIST dl %attrs; > <!ELEMENT dt %Inline;> <!ATTLIST dt %attrs; > <!ELEMENT dd %Flow;> <!ATTLIST dd %attrs; > <!--=================== Address ==========================================--> <!-- information on author --> <!ELEMENT address %Inline;> <!ATTLIST address %attrs; > <!--=================== Horizontal Rule ==================================--> <!ELEMENT hr EMPTY> <!ATTLIST hr %attrs; > <!--=================== Preformatted Text ================================--> <!-- content is %Inline; excluding "img|object|big|small|sub|sup" --> <!ELEMENT pre %pre.content;> <!ATTLIST pre %attrs; xml:space (preserve) #FIXED 'preserve' > <!--=================== Block-like Quotes ================================--> <!ELEMENT blockquote %Block;> <!ATTLIST blockquote %attrs; cite %URI; #IMPLIED > <!--=================== Inserted/Deleted Text ============================--> <!-- ins/del are allowed in block and inline content, but its inappropriate to include block content within an ins element occurring in inline content. --> <!ELEMENT ins %Flow;> <!ATTLIST ins %attrs; cite %URI; #IMPLIED datetime %Datetime; #IMPLIED > <!ELEMENT del %Flow;> <!ATTLIST del %attrs; cite %URI; #IMPLIED datetime %Datetime; #IMPLIED > <!--================== The Anchor Element ================================--> <!-- content is %Inline; except that anchors shouldn't be nested --> <!ELEMENT a %a.content;> <!ATTLIST a %attrs; %focus; charset %Charset; #IMPLIED type %ContentType; #IMPLIED name NMTOKEN #IMPLIED href %URI; #IMPLIED hreflang %LanguageCode; #IMPLIED rel %LinkTypes; #IMPLIED rev %LinkTypes; #IMPLIED shape %Shape; "rect" coords %Coords; #IMPLIED > <!--===================== Inline Elements ================================--> <!ELEMENT span %Inline;> <!-- generic language/style container --> <!ATTLIST span %attrs; > <!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride --> <!ATTLIST bdo %coreattrs; %events; lang %LanguageCode; #IMPLIED xml:lang %LanguageCode; #IMPLIED dir (ltr|rtl) #REQUIRED > <!ELEMENT br EMPTY> <!-- forced line break --> <!ATTLIST br %coreattrs; > <!ELEMENT em %Inline;> <!-- emphasis --> <!ATTLIST em %attrs;> <!ELEMENT strong %Inline;> <!-- strong emphasis --> <!ATTLIST strong %attrs;> <!ELEMENT dfn %Inline;> <!-- definitional --> <!ATTLIST dfn %attrs;> <!ELEMENT code %Inline;> <!-- program code --> <!ATTLIST code %attrs;> <!ELEMENT samp %Inline;> <!-- sample --> <!ATTLIST samp %attrs;> <!ELEMENT kbd %Inline;> <!-- something user would type --> <!ATTLIST kbd %attrs;> <!ELEMENT var %Inline;> <!-- variable --> <!ATTLIST var %attrs;> <!ELEMENT cite %Inline;> <!-- citation --> <!ATTLIST cite %attrs;> <!ELEMENT abbr %Inline;> <!-- abbreviation --> <!ATTLIST abbr %attrs;> <!ELEMENT acronym %Inline;> <!-- acronym --> <!ATTLIST acronym %attrs;> <!ELEMENT q %Inline;> <!-- inlined quote --> <!ATTLIST q %attrs; cite %URI; #IMPLIED > <!ELEMENT sub %Inline;> <!-- subscript --> <!ATTLIST sub %attrs;> <!ELEMENT sup %Inline;> <!-- superscript --> <!ATTLIST sup %attrs;> <!ELEMENT tt %Inline;> <!-- fixed pitch font --> <!ATTLIST tt %attrs;> <!ELEMENT i %Inline;> <!-- italic font --> <!ATTLIST i %attrs;> <!ELEMENT b %Inline;> <!-- bold font --> <!ATTLIST b %attrs;> <!ELEMENT big %Inline;> <!-- bigger font --> <!ATTLIST big %attrs;> <!ELEMENT small %Inline;> <!-- smaller font --> <!ATTLIST small %attrs;> <!--==================== Object ======================================--> <!-- object is used to embed objects as part of HTML pages. param elements should precede other content. Parameters can also be expressed as attribute/value pairs on the object element itself when brevity is desired. --> <!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*> <!ATTLIST object %attrs; declare (declare) #IMPLIED classid %URI; #IMPLIED codebase %URI; #IMPLIED data %URI; #IMPLIED type %ContentType; #IMPLIED codetype %ContentType; #IMPLIED archive %UriList; #IMPLIED standby %Text; #IMPLIED height %Length; #IMPLIED width %Length; #IMPLIED usemap %URI; #IMPLIED name NMTOKEN #IMPLIED tabindex %Number; #IMPLIED > <!-- param is used to supply a named property value. In XML it would seem natural to follow RDF and support an abbreviated syntax where the param elements are replaced by attribute value pairs on the object start tag. --> <!ELEMENT param EMPTY> <!ATTLIST param id ID #IMPLIED name CDATA #IMPLIED value CDATA #IMPLIED valuetype (data|ref|object) "data" type %ContentType; #IMPLIED > <!--=================== Images ===========================================--> <!-- To avoid accessibility problems for people who aren't able to see the image, you should provide a text description using the alt and longdesc attributes. In addition, avoid the use of server-side image maps. Note that in this DTD there is no name attribute. That is only available in the transitional and frameset DTD. --> <!ELEMENT img EMPTY> <!ATTLIST img %attrs; src %URI; #REQUIRED alt %Text; #REQUIRED longdesc %URI; #IMPLIED height %Length; #IMPLIED width %Length; #IMPLIED usemap %URI; #IMPLIED ismap (ismap) #IMPLIED > <!-- usemap points to a map element which may be in this document or an external document, although the latter is not widely supported --> <!--================== Client-side image maps ============================--> <!-- These can be placed in the same document or grouped in a separate document although this isn't yet widely supported --> <!ELEMENT map ((%block; | form | %misc;)+ | area+)> <!ATTLIST map %i18n; %events; id ID #REQUIRED class CDATA #IMPLIED style %StyleSheet; #IMPLIED title %Text; #IMPLIED name NMTOKEN #IMPLIED > <!ELEMENT area EMPTY> <!ATTLIST area %attrs; %focus; shape %Shape; "rect" coords %Coords; #IMPLIED href %URI; #IMPLIED nohref (nohref) #IMPLIED alt %Text; #REQUIRED > <!--================ Forms ===============================================--> <!ELEMENT form %form.content;> <!-- forms shouldn't be nested --> <!ATTLIST form %attrs; action %URI; #REQUIRED method (get|post) "get" enctype %ContentType; "application/x-www-form-urlencoded" onsubmit %Script; #IMPLIED onreset %Script; #IMPLIED accept %ContentTypes; #IMPLIED accept-charset %Charsets; #IMPLIED > <!-- Each label must not contain more than ONE field Label elements shouldn't be nested. --> <!ELEMENT label %Inline;> <!ATTLIST label %attrs; for IDREF #IMPLIED accesskey %Character; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED > <!ENTITY % InputType "(text | password | checkbox | radio | submit | reset | file | hidden | image | button)" > <!-- the name attribute is required for all but submit & reset --> <!ELEMENT input EMPTY> <!-- form control --> <!ATTLIST input %attrs; %focus; type %InputType; "text" name CDATA #IMPLIED value CDATA #IMPLIED checked (checked) #IMPLIED disabled (disabled) #IMPLIED readonly (readonly) #IMPLIED size CDATA #IMPLIED maxlength %Number; #IMPLIED src %URI; #IMPLIED alt CDATA #IMPLIED usemap %URI; #IMPLIED onselect %Script; #IMPLIED onchange %Script; #IMPLIED accept %ContentTypes; #IMPLIED > <!ELEMENT select (optgroup|option)+> <!-- option selector --> <!ATTLIST select %attrs; name CDATA #IMPLIED size %Number; #IMPLIED multiple (multiple) #IMPLIED disabled (disabled) #IMPLIED tabindex %Number; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED onchange %Script; #IMPLIED > <!ELEMENT optgroup (option)+> <!-- option group --> <!ATTLIST optgroup %attrs; disabled (disabled) #IMPLIED label %Text; #REQUIRED > <!ELEMENT option (#PCDATA)> <!-- selectable choice --> <!ATTLIST option %attrs; selected (selected) #IMPLIED disabled (disabled) #IMPLIED label %Text; #IMPLIED value CDATA #IMPLIED > <!ELEMENT textarea (#PCDATA)> <!-- multi-line text field --> <!ATTLIST textarea %attrs; %focus; name CDATA #IMPLIED rows %Number; #REQUIRED cols %Number; #REQUIRED disabled (disabled) #IMPLIED readonly (readonly) #IMPLIED onselect %Script; #IMPLIED onchange %Script; #IMPLIED > <!-- The fieldset element is used to group form fields. Only one legend element should occur in the content and if present should only be preceded by whitespace. --> <!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*> <!ATTLIST fieldset %attrs; > <!ELEMENT legend %Inline;> <!-- fieldset label --> <!ATTLIST legend %attrs; accesskey %Character; #IMPLIED > <!-- Content is %Flow; excluding a, form and form controls --> <!ELEMENT button %button.content;> <!-- push button --> <!ATTLIST button %attrs; %focus; name CDATA #IMPLIED value CDATA #IMPLIED type (button|submit|reset) "submit" disabled (disabled) #IMPLIED > <!--======================= Tables =======================================--> <!-- Derived from IETF HTML table standard, see [RFC1942] --> <!-- The border attribute sets the thickness of the frame around the table. The default units are screen pixels. The frame attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the valign attribute. --> <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> <!-- The rules attribute defines which rules to draw between cells: If rules is absent then assume: "none" if border is absent or border="0" otherwise "all" --> <!ENTITY % TRules "(none | groups | rows | cols | all)"> <!-- horizontal alignment attributes for cell contents char alignment char, e.g. char=':' charoff offset for alignment char --> <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED char %Character; #IMPLIED charoff %Length; #IMPLIED" > <!-- vertical alignment attributes for cell contents --> <!ENTITY % cellvalign "valign (top|middle|bottom|baseline) #IMPLIED" > <!ELEMENT table (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))> <!ELEMENT caption %Inline;> <!ELEMENT thead (tr)+> <!ELEMENT tfoot (tr)+> <!ELEMENT tbody (tr)+> <!ELEMENT colgroup (col)*> <!ELEMENT col EMPTY> <!ELEMENT tr (th|td)+> <!ELEMENT th %Flow;> <!ELEMENT td %Flow;> <!ATTLIST table %attrs; summary %Text; #IMPLIED width %Length; #IMPLIED border %Pixels; #IMPLIED frame %TFrame; #IMPLIED rules %TRules; #IMPLIED cellspacing %Length; #IMPLIED cellpadding %Length; #IMPLIED > <!ATTLIST caption %attrs; > <!-- colgroup groups a set of col elements. It allows you to group several semantically related columns together. --> <!ATTLIST colgroup %attrs; span %Number; "1" width %MultiLength; #IMPLIED %cellhalign; %cellvalign; > <!-- col elements define the alignment properties for cells in one or more columns. The width attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The span attribute causes the attributes of one col element to apply to more than one column. --> <!ATTLIST col %attrs; span %Number; "1" width %MultiLength; #IMPLIED %cellhalign; %cellvalign; > <!-- Use thead to duplicate headers when breaking table across page boundaries, or for static headers when tbody sections are rendered in scrolling panel. Use tfoot to duplicate footers when breaking table across page boundaries, or for static footers when tbody sections are rendered in scrolling panel. Use multiple tbody sections when rules are needed between groups of table rows. --> <!ATTLIST thead %attrs; %cellhalign; %cellvalign; > <!ATTLIST tfoot %attrs; %cellhalign; %cellvalign; > <!ATTLIST tbody %attrs; %cellhalign; %cellvalign; > <!ATTLIST tr %attrs; %cellhalign; %cellvalign; > <!-- Scope is simpler than headers attribute for common tables --> <!ENTITY % Scope "(row|col|rowgroup|colgroup)"> <!-- th is for headers, td for data and for cells acting as both --> <!ATTLIST th %attrs; abbr %Text; #IMPLIED axis CDATA #IMPLIED headers IDREFS #IMPLIED scope %Scope; #IMPLIED rowspan %Number; "1" colspan %Number; "1" %cellhalign; %cellvalign; > <!ATTLIST td %attrs; abbr %Text; #IMPLIED axis CDATA #IMPLIED headers IDREFS #IMPLIED scope %Scope; #IMPLIED rowspan %Number; "1" colspan %Number; "1" %cellhalign; %cellvalign; > Extensible HTML version 1.0 Transitional DTD <!-- Extensible HTML version 1.0 Transitional DTD This is the same as HTML 4 Transitional except for changes due to the differences between XML and SGML. Namespace = http://www.w3.org/1999/xhtml For further information, see: http://www.w3.org/TR/xhtml1 Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio), All Rights Reserved. This DTD module is identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" $Revision: 1.2 $ $Date: 2002/08/01 18:37:55 $ --> <!--================ Character mnemonic entities =========================--> <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "xhtml-lat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "xhtml-symbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "xhtml-special.ent"> %HTMLspecial; <!--================== Imported Names ====================================--> <!ENTITY % ContentType "CDATA"> <!-- media type, as per [RFC2045] --> <!ENTITY % ContentTypes "CDATA"> <!-- comma-separated list of media types, as per [RFC2045] --> <!ENTITY % Charset "CDATA"> <!-- a character encoding, as per [RFC2045] --> <!ENTITY % Charsets "CDATA"> <!-- a space separated list of character encodings, as per [RFC2045] --> <!ENTITY % LanguageCode "NMTOKEN"> <!-- a language code, as per [RFC3066] --> <!ENTITY % Character "CDATA"> <!-- a single character, as per section 2.2 of [XML] --> <!ENTITY % Number "CDATA"> <!-- one or more digits --> <!ENTITY % LinkTypes "CDATA"> <!-- space-separated list of link types --> <!ENTITY % MediaDesc "CDATA"> <!-- single or comma-separated list of media descriptors --> <!ENTITY % URI "CDATA"> <!-- a Uniform Resource Identifier, see [RFC2396] --> <!ENTITY % UriList "CDATA"> <!-- a space separated list of Uniform Resource Identifiers --> <!ENTITY % Datetime "CDATA"> <!-- date and time information. ISO date format --> <!ENTITY % Script "CDATA"> <!-- script expression --> <!ENTITY % StyleSheet "CDATA"> <!-- style sheet data --> <!ENTITY % Text "CDATA"> <!-- used for titles etc. --> <!ENTITY % FrameTarget "NMTOKEN"> <!-- render in this frame --> <!ENTITY % Length "CDATA"> <!-- nn for pixels or nn% for percentage length --> <!ENTITY % MultiLength "CDATA"> <!-- pixel, percentage, or relative --> <!ENTITY % Pixels "CDATA"> <!-- integer representing length in pixels --> <!-- these are used for image maps --> <!ENTITY % Shape "(rect|circle|poly|default)"> <!ENTITY % Coords "CDATA"> <!-- comma separated list of lengths --> <!-- used for object, applet, img, input and iframe --> <!ENTITY % ImgAlign "(top|middle|bottom|left|right)"> <!-- a color using sRGB: #RRGGBB as Hex values --> <!ENTITY % Color "CDATA"> <!-- There are also 16 widely known color names with their sRGB values: Black = #000000 Green = #008000 Silver = #C0C0C0 Lime = #00FF00 Gray = #808080 Olive = #808000 White = #FFFFFF Yellow = #FFFF00 Maroon = #800000 Navy = #000080 Red = #FF0000 Blue = #0000FF Purple = #800080 Teal = #008080 Fuchsia= #FF00FF Aqua = #00FFFF --> <!--=================== Generic Attributes ===============================--> <!-- core attributes common to most elements id document-wide unique id class space separated list of classes style associated style info title advisory title/amplification --> <!ENTITY % coreattrs "id ID #IMPLIED class CDATA #IMPLIED style %StyleSheet; #IMPLIED title %Text; #IMPLIED" > <!-- internationalization attributes lang language code (backwards compatible) xml:lang language code (as per XML 1.0 spec) dir direction for weak/neutral text --> <!ENTITY % i18n "lang %LanguageCode; #IMPLIED xml:lang %LanguageCode; #IMPLIED dir (ltr|rtl) #IMPLIED" > <!-- attributes for common UI events onclick a pointer button was clicked ondblclick a pointer button was double clicked onmousedown a pointer button was pressed down onmouseup a pointer button was released onmousemove a pointer was moved onto the element onmouseout a pointer was moved away from the element onkeypress a key was pressed and released onkeydown a key was pressed down onkeyup a key was released --> <!ENTITY % events "onclick %Script; #IMPLIED ondblclick %Script; #IMPLIED onmousedown %Script; #IMPLIED onmouseup %Script; #IMPLIED onmouseover %Script; #IMPLIED onmousemove %Script; #IMPLIED onmouseout %Script; #IMPLIED onkeypress %Script; #IMPLIED onkeydown %Script; #IMPLIED onkeyup %Script; #IMPLIED" > <!-- attributes for elements that can get the focus accesskey accessibility key character tabindex position in tabbing order onfocus the element got the focus onblur the element lost the focus --> <!ENTITY % focus "accesskey %Character; #IMPLIED tabindex %Number; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED" > <!ENTITY % attrs "%coreattrs; %i18n; %events;"> <!-- text alignment for p, div, h1-h6. The default is align="left" for ltr headings, "right" for rtl --> <!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED"> <!--=================== Text Elements ====================================--> <!ENTITY % special.extra "object | applet | img | map | iframe"> <!ENTITY % special.basic "br | span | bdo"> <!ENTITY % special "%special.basic; | %special.extra;"> <!ENTITY % fontstyle.extra "big | small | font | basefont"> <!ENTITY % fontstyle.basic "tt | i | b | u | s | strike "> <!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;"> <!ENTITY % phrase.extra "sub | sup"> <!ENTITY % phrase.basic "em | strong | dfn | code | q | samp | kbd | var | cite | abbr | acronym"> <!ENTITY % phrase "%phrase.basic; | %phrase.extra;"> <!ENTITY % inline.forms "input | select | textarea | label | button"> <!-- these can occur at block or inline level --> <!ENTITY % misc.inline "ins | del | script"> <!-- these can only occur at block level --> <!ENTITY % misc "noscript | %misc.inline;"> <!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;"> <!-- %Inline; covers inline or "text-level" elements --> <!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*"> <!--================== Block level elements ==============================--> <!ENTITY % heading "h1|h2|h3|h4|h5|h6"> <!ENTITY % lists "ul | ol | dl | menu | dir"> <!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes"> <!ENTITY % block "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table"> <!-- %Flow; mixes block and inline and is used for list items etc. --> <!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*"> <!--================== Content models for exclusions =====================--> <!-- a elements use %Inline; excluding a --> <!ENTITY % a.content "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*"> <!-- pre uses %Inline excluding img, object, applet, big, small, font, or basefont --> <!ENTITY % pre.content "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; | %inline.forms; | %misc.inline;)*"> <!-- form uses %Flow; excluding form --> <!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*"> <!-- button uses %Flow; but excludes a, form, form controls, iframe --> <!ENTITY % button.content "(#PCDATA | p | %heading; | div | %lists; | %blocktext; | table | br | span | bdo | object | applet | img | map | %fontstyle; | %phrase; | %misc;)*"> <!--================ Document Structure ==================================--> <!-- the namespace URI designates the document profile --> <!ELEMENT html (head, body)> <!ATTLIST html %i18n; id ID #IMPLIED xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml' > <!--================ Document Head =======================================--> <!ENTITY % head.misc "(script|style|meta|link|object|isindex)*"> <!-- content model is %head.misc; combined with a single title and an optional base element in any order --> <!ELEMENT head (%head.misc;, ((title, %head.misc;, (base, %head.misc;)?) | (base, %head.misc;, (title, %head.misc;))))> <!ATTLIST head %i18n; id ID #IMPLIED profile %URI; #IMPLIED > <!-- The title element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. --> <!ELEMENT title (#PCDATA)> <!ATTLIST title %i18n; id ID #IMPLIED > <!-- document base URI --> <!ELEMENT base EMPTY> <!ATTLIST base id ID #IMPLIED href %URI; #IMPLIED target %FrameTarget; #IMPLIED > <!-- generic metainformation --> <!ELEMENT meta EMPTY> <!ATTLIST meta %i18n; id ID #IMPLIED http-equiv CDATA #IMPLIED name CDATA #IMPLIED content CDATA #REQUIRED scheme CDATA #IMPLIED > <!-- Relationship values can be used in principle: a) for document specific toolbars/menus when used with the link element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel="stylesheet") c) to make a link to a script (rel="script") d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a PostScript or PDF version (rel="alternate" media="print") --> <!ELEMENT link EMPTY> <!ATTLIST link %attrs; charset %Charset; #IMPLIED href %URI; #IMPLIED hreflang %LanguageCode; #IMPLIED type %ContentType; #IMPLIED rel %LinkTypes; #IMPLIED rev %LinkTypes; #IMPLIED media %MediaDesc; #IMPLIED target %FrameTarget; #IMPLIED > <!-- style info, which may include CDATA sections --> <!ELEMENT style (#PCDATA)> <!ATTLIST style %i18n; id ID #IMPLIED type %ContentType; #REQUIRED media %MediaDesc; #IMPLIED title %Text; #IMPLIED xml:space (preserve) #FIXED 'preserve' > <!-- script statements, which may include CDATA sections --> <!ELEMENT script (#PCDATA)> <!ATTLIST script id ID #IMPLIED charset %Charset; #IMPLIED type %ContentType; #REQUIRED language CDATA #IMPLIED src %URI; #IMPLIED defer (defer) #IMPLIED xml:space (preserve) #FIXED 'preserve' > <!-- alternate content container for non script-based rendering --> <!ELEMENT noscript %Flow;> <!ATTLIST noscript %attrs; > <!--======================= Frames =======================================--> <!-- inline subwindow --> <!ELEMENT iframe %Flow;> <!ATTLIST iframe %coreattrs; longdesc %URI; #IMPLIED name NMTOKEN #IMPLIED src %URI; #IMPLIED frameborder (1|0) "1" marginwidth %Pixels; #IMPLIED marginheight %Pixels; #IMPLIED scrolling (yes|no|auto) "auto" align %ImgAlign; #IMPLIED height %Length; #IMPLIED width %Length; #IMPLIED > <!-- alternate content container for non frame-based rendering --> <!ELEMENT noframes %Flow;> <!ATTLIST noframes %attrs; > <!--=================== Document Body ====================================--> <!ELEMENT body %Flow;> <!ATTLIST body %attrs; onload %Script; #IMPLIED onunload %Script; #IMPLIED background %URI; #IMPLIED bgcolor %Color; #IMPLIED text %Color; #IMPLIED link %Color; #IMPLIED vlink %Color; #IMPLIED alink %Color; #IMPLIED > <!ELEMENT div %Flow;> <!-- generic language/style container --> <!ATTLIST div %attrs; %TextAlign; > <!--=================== Paragraphs =======================================--> <!ELEMENT p %Inline;> <!ATTLIST p %attrs; %TextAlign; > <!--=================== Headings =========================================--> <!-- There are six levels of headings from h1 (the most important) to h6 (the least important). --> <!ELEMENT h1 %Inline;> <!ATTLIST h1 %attrs; %TextAlign; > <!ELEMENT h2 %Inline;> <!ATTLIST h2 %attrs; %TextAlign; > <!ELEMENT h3 %Inline;> <!ATTLIST h3 %attrs; %TextAlign; > <!ELEMENT h4 %Inline;> <!ATTLIST h4 %attrs; %TextAlign; > <!ELEMENT h5 %Inline;> <!ATTLIST h5 %attrs; %TextAlign; > <!ELEMENT h6 %Inline;> <!ATTLIST h6 %attrs; %TextAlign; > <!--=================== Lists ============================================--> <!-- Unordered list bullet styles --> <!ENTITY % ULStyle "(disc|square|circle)"> <!-- Unordered list --> <!ELEMENT ul (li)+> <!ATTLIST ul %attrs; type %ULStyle; #IMPLIED compact (compact) #IMPLIED > <!-- Ordered list numbering style 1 arabic numbers 1, 2, 3, ... a lower alpha a, b, c, ... A upper alpha A, B, C, ... i lower roman i, ii, iii, ... I upper roman I, II, III, ... The style is applied to the sequence number which by default is reset to 1 for the first list item in an ordered list. --> <!ENTITY % OLStyle "CDATA"> <!-- Ordered (numbered) list --> <!ELEMENT ol (li)+> <!ATTLIST ol %attrs; type %OLStyle; #IMPLIED compact (compact) #IMPLIED start %Number; #IMPLIED > <!-- single column list (DEPRECATED) --> <!ELEMENT menu (li)+> <!ATTLIST menu %attrs; compact (compact) #IMPLIED > <!-- multiple column list (DEPRECATED) --> <!ELEMENT dir (li)+> <!ATTLIST dir %attrs; compact (compact) #IMPLIED > <!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" --> <!ENTITY % LIStyle "CDATA"> <!-- list item --> <!ELEMENT li %Flow;> <!ATTLIST li %attrs; type %LIStyle; #IMPLIED value %Number; #IMPLIED > <!-- definition lists - dt for term, dd for its definition --> <!ELEMENT dl (dt|dd)+> <!ATTLIST dl %attrs; compact (compact) #IMPLIED > <!ELEMENT dt %Inline;> <!ATTLIST dt %attrs; > <!ELEMENT dd %Flow;> <!ATTLIST dd %attrs; > <!--=================== Address ==========================================--> <!-- information on author --> <!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*> <!ATTLIST address %attrs; > <!--=================== Horizontal Rule ==================================--> <!ELEMENT hr EMPTY> <!ATTLIST hr %attrs; align (left|center|right) #IMPLIED noshade (noshade) #IMPLIED size %Pixels; #IMPLIED width %Length; #IMPLIED > <!--=================== Preformatted Text ================================--> <!-- content is %Inline; excluding "img|object|applet|big|small|sub|sup|font|basefont" --> <!ELEMENT pre %pre.content;> <!ATTLIST pre %attrs; width %Number; #IMPLIED xml:space (preserve) #FIXED 'preserve' > <!--=================== Block-like Quotes ================================--> <!ELEMENT blockquote %Flow;> <!ATTLIST blockquote %attrs; cite %URI; #IMPLIED > <!--=================== Text alignment ===================================--> <!-- center content --> <!ELEMENT center %Flow;> <!ATTLIST center %attrs; > <!--=================== Inserted/Deleted Text ============================--> <!-- ins/del are allowed in block and inline content, but its inappropriate to include block content within an ins element occurring in inline content. --> <!ELEMENT ins %Flow;> <!ATTLIST ins %attrs; cite %URI; #IMPLIED datetime %Datetime; #IMPLIED > <!ELEMENT del %Flow;> <!ATTLIST del %attrs; cite %URI; #IMPLIED datetime %Datetime; #IMPLIED > <!--================== The Anchor Element ================================--> <!-- content is %Inline; except that anchors shouldn't be nested --> <!ELEMENT a %a.content;> <!ATTLIST a %attrs; %focus; charset %Charset; #IMPLIED type %ContentType; #IMPLIED name NMTOKEN #IMPLIED href %URI; #IMPLIED hreflang %LanguageCode; #IMPLIED rel %LinkTypes; #IMPLIED rev %LinkTypes; #IMPLIED shape %Shape; "rect" coords %Coords; #IMPLIED target %FrameTarget; #IMPLIED > <!--===================== Inline Elements ================================--> <!ELEMENT span %Inline;> <!-- generic language/style container --> <!ATTLIST span %attrs; > <!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride --> <!ATTLIST bdo %coreattrs; %events; lang %LanguageCode; #IMPLIED xml:lang %LanguageCode; #IMPLIED dir (ltr|rtl) #REQUIRED > <!ELEMENT br EMPTY> <!-- forced line break --> <!ATTLIST br %coreattrs; clear (left|all|right|none) "none" > <!ELEMENT em %Inline;> <!-- emphasis --> <!ATTLIST em %attrs;> <!ELEMENT strong %Inline;> <!-- strong emphasis --> <!ATTLIST strong %attrs;> <!ELEMENT dfn %Inline;> <!-- definitional --> <!ATTLIST dfn %attrs;> <!ELEMENT code %Inline;> <!-- program code --> <!ATTLIST code %attrs;> <!ELEMENT samp %Inline;> <!-- sample --> <!ATTLIST samp %attrs;> <!ELEMENT kbd %Inline;> <!-- something user would type --> <!ATTLIST kbd %attrs;> <!ELEMENT var %Inline;> <!-- variable --> <!ATTLIST var %attrs;> <!ELEMENT cite %Inline;> <!-- citation --> <!ATTLIST cite %attrs;> <!ELEMENT abbr %Inline;> <!-- abbreviation --> <!ATTLIST abbr %attrs;> <!ELEMENT acronym %Inline;> <!-- acronym --> <!ATTLIST acronym %attrs;> <!ELEMENT q %Inline;> <!-- inlined quote --> <!ATTLIST q %attrs; cite %URI; #IMPLIED > <!ELEMENT sub %Inline;> <!-- subscript --> <!ATTLIST sub %attrs;> <!ELEMENT sup %Inline;> <!-- superscript --> <!ATTLIST sup %attrs;> <!ELEMENT tt %Inline;> <!-- fixed pitch font --> <!ATTLIST tt %attrs;> <!ELEMENT i %Inline;> <!-- italic font --> <!ATTLIST i %attrs;> <!ELEMENT b %Inline;> <!-- bold font --> <!ATTLIST b %attrs;> <!ELEMENT big %Inline;> <!-- bigger font --> <!ATTLIST big %attrs;> <!ELEMENT small %Inline;> <!-- smaller font --> <!ATTLIST small %attrs;> <!ELEMENT u %Inline;> <!-- underline --> <!ATTLIST u %attrs;> <!ELEMENT s %Inline;> <!-- strike-through --> <!ATTLIST s %attrs;> <!ELEMENT strike %Inline;> <!-- strike-through --> <!ATTLIST strike %attrs;> <!ELEMENT basefont EMPTY> <!-- base font size --> <!ATTLIST basefont id ID #IMPLIED size CDATA #REQUIRED color %Color; #IMPLIED face CDATA #IMPLIED > <!ELEMENT font %Inline;> <!-- local change to font --> <!ATTLIST font %coreattrs; %i18n; size CDATA #IMPLIED color %Color; #IMPLIED face CDATA #IMPLIED > <!--==================== Object ======================================--> <!-- object is used to embed objects as part of HTML pages. param elements should precede other content. Parameters can also be expressed as attribute/value pairs on the object element itself when brevity is desired. --> <!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*> <!ATTLIST object %attrs; declare (declare) #IMPLIED classid %URI; #IMPLIED codebase %URI; #IMPLIED data %URI; #IMPLIED type %ContentType; #IMPLIED codetype %ContentType; #IMPLIED archive %UriList; #IMPLIED standby %Text; #IMPLIED height %Length; #IMPLIED width %Length; #IMPLIED usemap %URI; #IMPLIED name NMTOKEN #IMPLIED tabindex %Number; #IMPLIED align %ImgAlign; #IMPLIED border %Pixels; #IMPLIED hspace %Pixels; #IMPLIED vspace %Pixels; #IMPLIED > <!-- param is used to supply a named property value. In XML it would seem natural to follow RDF and support an abbreviated syntax where the param elements are replaced by attribute value pairs on the object start tag. --> <!ELEMENT param EMPTY> <!ATTLIST param id ID #IMPLIED name CDATA #REQUIRED value CDATA #IMPLIED valuetype (data|ref|object) "data" type %ContentType; #IMPLIED > <!--=================== Java applet ==================================--> <!-- One of code or object attributes must be present. Place param elements before other content. --> <!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*> <!ATTLIST applet %coreattrs; codebase %URI; #IMPLIED archive CDATA #IMPLIED code CDATA #IMPLIED object CDATA #IMPLIED alt %Text; #IMPLIED name NMTOKEN #IMPLIED width %Length; #REQUIRED height %Length; #REQUIRED align %ImgAlign; #IMPLIED hspace %Pixels; #IMPLIED vspace %Pixels; #IMPLIED > <!--=================== Images ===========================================--> <!-- To avoid accessibility problems for people who aren't able to see the image, you should provide a text description using the alt and longdesc attributes. In addition, avoid the use of server-side image maps. --> <!ELEMENT img EMPTY> <!ATTLIST img %attrs; src %URI; #REQUIRED alt %Text; #REQUIRED name NMTOKEN #IMPLIED longdesc %URI; #IMPLIED height %Length; #IMPLIED width %Length; #IMPLIED usemap %URI; #IMPLIED ismap (ismap) #IMPLIED align %ImgAlign; #IMPLIED border %Length; #IMPLIED hspace %Pixels; #IMPLIED vspace %Pixels; #IMPLIED > <!-- usemap points to a map element which may be in this document or an external document, although the latter is not widely supported --> <!--================== Client-side image maps ============================--> <!-- These can be placed in the same document or grouped in a separate document although this isn't yet widely supported --> <!ELEMENT map ((%block; | form | %misc;)+ | area+)> <!ATTLIST map %i18n; %events; id ID #REQUIRED class CDATA #IMPLIED style %StyleSheet; #IMPLIED title %Text; #IMPLIED name CDATA #IMPLIED > <!ELEMENT area EMPTY> <!ATTLIST area %attrs; %focus; shape %Shape; "rect" coords %Coords; #IMPLIED href %URI; #IMPLIED nohref (nohref) #IMPLIED alt %Text; #REQUIRED target %FrameTarget; #IMPLIED > <!--================ Forms ===============================================--> <!ELEMENT form %form.content;> <!-- forms shouldn't be nested --> <!ATTLIST form %attrs; action %URI; #REQUIRED method (get|post) "get" name NMTOKEN #IMPLIED enctype %ContentType; "application/x-www-form-urlencoded" onsubmit %Script; #IMPLIED onreset %Script; #IMPLIED accept %ContentTypes; #IMPLIED accept-charset %Charsets; #IMPLIED target %FrameTarget; #IMPLIED > <!-- Each label must not contain more than ONE field Label elements shouldn't be nested. --> <!ELEMENT label %Inline;> <!ATTLIST label %attrs; for IDREF #IMPLIED accesskey %Character; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED > <!ENTITY % InputType "(text | password | checkbox | radio | submit | reset | file | hidden | image | button)" > <!-- the name attribute is required for all but submit & reset --> <!ELEMENT input EMPTY> <!-- form control --> <!ATTLIST input %attrs; %focus; type %InputType; "text" name CDATA #IMPLIED value CDATA #IMPLIED checked (checked) #IMPLIED disabled (disabled) #IMPLIED readonly (readonly) #IMPLIED size CDATA #IMPLIED maxlength %Number; #IMPLIED src %URI; #IMPLIED alt CDATA #IMPLIED usemap %URI; #IMPLIED onselect %Script; #IMPLIED onchange %Script; #IMPLIED accept %ContentTypes; #IMPLIED align %ImgAlign; #IMPLIED > <!ELEMENT select (optgroup|option)+> <!-- option selector --> <!ATTLIST select %attrs; name CDATA #IMPLIED size %Number; #IMPLIED multiple (multiple) #IMPLIED disabled (disabled) #IMPLIED tabindex %Number; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED onchange %Script; #IMPLIED > <!ELEMENT optgroup (option)+> <!-- option group --> <!ATTLIST optgroup %attrs; disabled (disabled) #IMPLIED label %Text; #REQUIRED > <!ELEMENT option (#PCDATA)> <!-- selectable choice --> <!ATTLIST option %attrs; selected (selected) #IMPLIED disabled (disabled) #IMPLIED label %Text; #IMPLIED value CDATA #IMPLIED > <!ELEMENT textarea (#PCDATA)> <!-- multi-line text field --> <!ATTLIST textarea %attrs; %focus; name CDATA #IMPLIED rows %Number; #REQUIRED cols %Number; #REQUIRED disabled (disabled) #IMPLIED readonly (readonly) #IMPLIED onselect %Script; #IMPLIED onchange %Script; #IMPLIED > <!-- The fieldset element is used to group form fields. Only one legend element should occur in the content and if present should only be preceded by whitespace. --> <!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*> <!ATTLIST fieldset %attrs; > <!ENTITY % LAlign "(top|bottom|left|right)"> <!ELEMENT legend %Inline;> <!-- fieldset label --> <!ATTLIST legend %attrs; accesskey %Character; #IMPLIED align %LAlign; #IMPLIED > <!-- Content is %Flow; excluding a, form, form controls, iframe --> <!ELEMENT button %button.content;> <!-- push button --> <!ATTLIST button %attrs; %focus; name CDATA #IMPLIED value CDATA #IMPLIED type (button|submit|reset) "submit" disabled (disabled) #IMPLIED > <!-- single-line text input control (DEPRECATED) --> <!ELEMENT isindex EMPTY> <!ATTLIST isindex %coreattrs; %i18n; prompt %Text; #IMPLIED > <!--======================= Tables =======================================--> <!-- Derived from IETF HTML table standard, see [RFC1942] --> <!-- The border attribute sets the thickness of the frame around the table. The default units are screen pixels. The frame attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the valign attribute. --> <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> <!-- The rules attribute defines which rules to draw between cells: If rules is absent then assume: "none" if border is absent or border="0" otherwise "all" --> <!ENTITY % TRules "(none | groups | rows | cols | all)"> <!-- horizontal placement of table relative to document --> <!ENTITY % TAlign "(left|center|right)"> <!-- horizontal alignment attributes for cell contents char alignment char, e.g. char=':' charoff offset for alignment char --> <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED char %Character; #IMPLIED charoff %Length; #IMPLIED" > <!-- vertical alignment attributes for cell contents --> <!ENTITY % cellvalign "valign (top|middle|bottom|baseline) #IMPLIED" > <!ELEMENT table (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))> <!ELEMENT caption %Inline;> <!ELEMENT thead (tr)+> <!ELEMENT tfoot (tr)+> <!ELEMENT tbody (tr)+> <!ELEMENT colgroup (col)*> <!ELEMENT col EMPTY> <!ELEMENT tr (th|td)+> <!ELEMENT th %Flow;> <!ELEMENT td %Flow;> <!ATTLIST table %attrs; summary %Text; #IMPLIED width %Length; #IMPLIED border %Pixels; #IMPLIED frame %TFrame; #IMPLIED rules %TRules; #IMPLIED cellspacing %Length; #IMPLIED cellpadding %Length; #IMPLIED align %TAlign; #IMPLIED bgcolor %Color; #IMPLIED > <!ENTITY % CAlign "(top|bottom|left|right)"> <!ATTLIST caption %attrs; align %CAlign; #IMPLIED > <!-- colgroup groups a set of col elements. It allows you to group several semantically related columns together. --> <!ATTLIST colgroup %attrs; span %Number; "1" width %MultiLength; #IMPLIED %cellhalign; %cellvalign; > <!-- col elements define the alignment properties for cells in one or more columns. The width attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The span attribute causes the attributes of one col element to apply to more than one column. --> <!ATTLIST col %attrs; span %Number; "1" width %MultiLength; #IMPLIED %cellhalign; %cellvalign; > <!-- Use thead to duplicate headers when breaking table across page boundaries, or for static headers when tbody sections are rendered in scrolling panel. Use tfoot to duplicate footers when breaking table across page boundaries, or for static footers when tbody sections are rendered in scrolling panel. Use multiple tbody sections when rules are needed between groups of table rows. --> <!ATTLIST thead %attrs; %cellhalign; %cellvalign; > <!ATTLIST tfoot %attrs; %cellhalign; %cellvalign; > <!ATTLIST tbody %attrs; %cellhalign; %cellvalign; > <!ATTLIST tr %attrs; %cellhalign; %cellvalign; bgcolor %Color; #IMPLIED > <!-- Scope is simpler than headers attribute for common tables --> <!ENTITY % Scope "(row|col|rowgroup|colgroup)"> <!-- th is for headers, td for data and for cells acting as both --> <!ATTLIST th %attrs; abbr %Text; #IMPLIED axis CDATA #IMPLIED headers IDREFS #IMPLIED scope %Scope; #IMPLIED rowspan %Number; "1" colspan %Number; "1" %cellhalign; %cellvalign; nowrap (nowrap) #IMPLIED bgcolor %Color; #IMPLIED width %Length; #IMPLIED height %Length; #IMPLIED > <!ATTLIST td %attrs; abbr %Text; #IMPLIED axis CDATA #IMPLIED headers IDREFS #IMPLIED scope %Scope; #IMPLIED rowspan %Number; "1" colspan %Number; "1" %cellhalign; %cellvalign; nowrap (nowrap) #IMPLIED bgcolor %Color; #IMPLIED width %Length; #IMPLIED height %Length; #IMPLIED >
相关推荐
DOCTYPE>标签的定义和用法。 准确的说,<!DOCTYPE>并不是HTML标签,它声明web浏览器关于页面使用哪个 HTML 版本进行编写的指令。 在 HTML 4.01 中,<!DOCTYPE> 声明引用 DTD,因为 HTML 4.01 基于 SGML。DTD 规定了...
2. **语义相似**:两者都使用相同的元素来定义网页的结构,如`<html>`, `<head>`, `<body>`, `<p>`, `<div>`等。 3. **文档类型声明**:在HTML和XHTML中,文档类型的声明`<!DOCTYPE>`用于指示浏览器按照哪种标准解析...
博客文章: 关于HTML中的 <!DOCTYPE> 声明 文章配套示例HTML源代码 内容说明:DOCTYPE是Document Type(文档类型)的简写,要想制作符合标准的HTML页面,一个必不可少的关键组成部分就是DOCTYPE声明。
-- 单标签(也称空标签):有头没有尾,结尾会有一个关闭符,可写可不写 --> <!-- charset="UTF-8":声明该文档的字符编码集是UTF-8,如果不写,就会导致中文乱码 --> <!-- mate标签可以描述该文档的作者,项目说明...
这个声明位于HTML文档的开头,且必须在 `<html>` 标签之前。 `<!DOCTYPE html>` 是HTML5规范中的声明方式,它表明当前文档是一个符合HTML5标准的网页。在HTML5之前,不同的DOCTYPE声明对应着不同的HTML或XHTML版本...
DOCTYPE> 文档类型 <html>文档 <body>文档主体 <h1> to <h6> HTML 标题 <p>段落 <br>换行 <hr>水平线 <!--...-->注释 --文本 <b>粗体文本 <font>不赞成用。文本字体、尺寸和颜色 <i>斜体文本 <em>强调文本 <big>大...
-- 自定义的标记名--> <name>hello</name> <!--该标记对应的类的类名--> <tagclass>org.whatisjava.mvc.taglib.HelloTag</tagclass> <!--用于规定标记体的内容--> <bodycontent>empty</bodycontent> <!-...
...<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> ... <h1>欢迎来到我的网页</h1> <p>这是一个简单的HTML页面示例。</p> </header> <!-- 导航区域 --> <nav> <ul>
DOCTYPE>`标签没有闭合标签,即它不需要以`>`结束。 DOCTYPE声明的格式通常如下: ```html <!DOCTYPE 类型 PUBLIC "公开标识符" "系统标识符"> ``` 其中: - `类型`:指明文档遵循的HTML或XHTML规范。 - `公开...
html表格样式<!DOCTYPE html> <html> <style type="text/css"> td{ text-align:center;... <caption><strong>明星排行榜</strong> <a href="">添加</a></caption> <!-- <colgroup span="1" bgco
- `<header>`、`<footer>`和`<nav>`:页面的头部、尾部和导航部分。 - `<section>`和`<article>`:定义文档中的独立部分。 - `<code>`和`<kbd>`:表示代码块和键盘输入。 通过学习这些基本标签,你可以创建出...
在这个吃豆人游戏中,HTML文件包含了一系列的元素,如`<div>`用于创建游戏区域,`<canvas>`作为图形绘制的画布,以及可能的`<script>`标签来引入JavaScript代码。HTML代码还会定义游戏界面的布局,如按钮、得分显示...
- 有序列表:`<ol>`,同样使用`<li>`表示列表项,可以通过`type`属性改变编号样式。 ##### 14. 其他标签 - `<span>`:一般用于样式处理。 - `<strong>`:表示重要的文字。 - `<em>`:强调文字,通常表现为斜体。 -...
<title>标题标签</title> </head> <body> <!-- 1. HTML 官方提供了6级文本标题--> <h1>h1文本内容</h1> <h2>h2文本内容</h2> <h3>h3文本内容</h3> <h4>h4文本内容</h4> <h5>h5文本内容</h5> <h6>h6文本...
HTML标签是由尖括号包围的关键字,比如<html>,HTML标签通常是成对出现的,比如<b></b>,标签对中的第一个标签为开始标签,第二个标签为结束标签,开始标签和结束标签也被称为开放标签和闭合标签 HTML注释: <!–...
DOCTYPE>`标签的作用与使用方法 `<!DOCTYPE>`标签作为HTML文档的首个元素,在整个文档解析过程中起着至关重要的作用。它告诉浏览器当前文档遵循的是哪种HTML标准,从而确保浏览器能够正确地解析和渲染网页。 #####...
- `<select>`:下拉选择列表。 - `<option>`:下拉选项。 - `<label>`:关联输入元素,提供更好的可读性和交互性。 11. **多媒体标签**: - `<audio>`:用于插入音频,支持多个`src`来适应不同的浏览器。 - `...
-- <font color="red">我的第一个标题</font> -->`:注释掉了一段使用`<font>`标签设置文字颜色的代码。注意,在HTML5中不推荐使用`<font>`标签,因为有更好的CSS方法来替代它。 - `<p>我的第一个段落。</p>`:定义...
<!-- * @Author: xf * @Date: 2020-12-25 15:02:20 * @LastEditTime: 2020-12-25 17:02:19 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \抖音-流动爱心闪光...