符合XHTML Strict 1.0 W3C组织标准的标签与结构
星期一, 八月 17th, 2009, 15:53 | YSjia 点击2065次合理标签
结构 htmlheadbodydivspan
元信息 DOCTYPEtitlelinkmetastyle
文本 ph1h2h3h4h5h6strongemabbracronymaddressbdoblockquoteciteqcodeinsdel dfnkbdpresampvarbr
链接 abase
图像和对象 imgareamapobjectparam
列表 ulollidldtdd
表格 tabletrtdthtbodytheadtfootcolcolgroupcaption
表单 forminputtextareaselectoptionoptgroupbuttonlabelfieldsetlegend
脚本 scriptnoscript
表现 bittsubsupbigsmallhr
合理的结构
HTML
- HEAD
- TITLE (required)
- SCRIPT, STYLE
- CDATA
- BASE, META, LINK (empty)
- OBJECT (see content model below)
- BODY
- INS, DEL (special rules apply)
- flow
- block
- inline
- flow
- SCRIPT
- CDATA
- block
- P, H1, H2, H3, H4, H5, H6
- inline
- #PCDATA
- TT, I, B, BIG, SMALL, EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, ACRONYM, SUB, SUP, Q, SPAN, BDO
- inline
- A
- inline excluding an enclosed A element
- OBJECT
- PARAM (empty)
- flow
- IMG, BR (empty)
- SCRIPT
- CDATA
- MAP
- AREA (empty)
- block
- INPUT (empty)
- SELECT
- OPTGROUP
- OPTION
- OPTION
- OPTGROUP
- TEXTAREA
- LABEL
- LABEL excluding enclosed LABEL
- BUTTON
- flow excluding A, INPUT, SELECT, TEXTAREA, LABEL, BUTTON, FORM, FIELDSET
- inline
- UL, OL
- LI
- flow
- LI
- DL
- DT
- inline
- DD
- flow
- DT
- PRE
- inline excluding IMG, OBJECT, BIG, SMALL, SUB, SUP
- DIV
- flow
- BLOCKQUOTE
- block
- SCRIPT
- CDATA
- NOSCRIPT
- flow
- FORM
- block excluding an enclosed FORM
- SCRIPT
- CDATA
- HR (empty)
- TABLE
- CAPTION
- inline
- COLGROUP
- COL (empty)
- COL (empty)
- THEAD, TBODY, TBODY
- TR
- TH, TD
- flow
- TH, TD
- TR
- CAPTION
- ADDRESS
- inline
- FIELDSET
- #PCDATA
- inline
- flow
- LEGEND
- inline
- P, H1, H2, H3, H4, H5, H6
- INS, DEL (special rules apply)
结构来总结来自:Allowed nesting of elements in HTML 4 Strict (and XHTML 1.0 Strict)
结构说明原文(英文翻译不咋的,不想误人子弟,所以不是请大家自己看吧):
An uppercase word stands for the corresponding element. (Note that by XHTML rules, element names must be written in lower case, e.g. <html>, not<HTML>.)A lowercase word is a term which describes a collection of HTML elements. Each entry is followed by a list of elements which may appear within the elements specified by the entry. If there is no such list, no nested elements are allowed. This means that only text (#PCDATA, see next item) is allowed inside the element; but if the note (empty) is given, it means that no content whatsoever is allowed. However, for flow, inline, block, OBJECT, and BODY the allowed contents are described separately under the main entries for them. #PCDATA means "parsed character data", which is plain text (without HTML tags, but "escape sequences" such as äandäare allowed)CDATA means "character data", which is plain text where even "escape sequences" aren’t interpreted; for a much better explanation, see the article CDATA Confusion by Joe English excluding … means that the element must not contain any of the listed elements, directly or indirectly.
如果你喜欢请+1
Tags: xhtml
学习下了
[回复]
默默学习之..
[回复]
囧……这不是官方的技术文档吗?
[回复]
应该说是对官方文档的精简与总结,主要是备忘加深记忆。
[回复]