你现在的位置 -> try it » 实验室

符合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)
    • 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.
  • 原创文章转载请注明:YSlove.net
    本文固定链接:http://yslove.net/2009/08/xhtml-strict-1-0-structural-element/


    如果你喜欢请+1 ^_^

    Tags:

    4 Responses to “符合XHTML Strict 1.0 W3C组织标准的标签与结构”

    1. 老K 说:

      默默学习之..

      [回复]

    2. bolo 说:

      囧……这不是官方的技术文档吗?

      [回复]

      Y.Jiajia 说:

      应该说是对官方文档的精简与总结,主要是备忘加深记忆。

      [回复]

    留下你的足迹

    分类

    相关文章

    随机作品

    GlobalMarket Career

    让网页变得简单灵活

    工作流至关重要

    用最简单与高效的手法去实现复杂的交互是一件非常有趣的事。草图,最容易画,也最容易修改,这样可以省时省力,又可以降低工作中的耦合度。

    SCM Web Design

    简单的表达出完整的需求,就是好的表达方式。

    UAT9