符合XHTML Strict 1.0 W3C组织标准的标签与结构

合理标签

结构
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)
    • 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
          • TEXTAREA
          • LABEL
            • LABEL excluding enclosed LABEL
          • BUTTON
            • flow excluding A, INPUT, SELECT, TEXTAREA, LABEL, BUTTON, FORM, FIELDSET
      • UL, OL
        • LI
          • flow
      • DL
        • DT
          • inline
        • DD
          • flow
      • 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
      • ADDRESS
        • inline
      • FIELDSET
        • #PCDATA
        • inline
        • flow
        • LEGEND
          • inline

结构来总结来自: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 &auml; and &#228; 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.
  • 此条目发表在 try it, 实验室 分类目录,贴了 标签。将固定链接加入收藏夹。