⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xhtml1.xhtml

📁 下载来的一个看图软件的源代码
💻 XHTML
📖 第 1 页 / 共 4 页
字号:
entity for the Euro currency sign (<code>&amp;euro;</code> or<code>&amp;#8364;</code> or <code>&amp;#x20AC;</code>) is definedas part of the special characters.</p><ul><li><p><a href="DTD/xhtml-lat1.ent">Latin-1 characters</a></p></li><li><p><a href="DTD/xhtml-special.ent">Special characters</a></p></li><li><p><a href="DTD/xhtml-symbol.ent">Symbols</a></p></li></ul><!--OddPage--><h1><a name="prohibitions" id="prohibitions">Appendix B. ElementProhibitions</a></h1><p><b>This appendix is normative.</b></p><p>The following elements have prohibitions on which elementsthey can contain (see <a href="#h-4.9">Section 4.9</a>). Thisprohibition applies to all depths of nesting, i.e. it containsall the descendant elements.</p><dl><dt><code class="tag">a</code></dt><dd>cannot contain other <code>a</code> elements.</dd><dt><code class="tag">pre</code></dt><dd>cannot contain the <code>img</code>, <code>object</code>,<code>big</code>, <code>small</code>, <code>sub</code>, or <code>sup</code> elements.</dd><dt><code class="tag">button</code></dt><dd>cannot contain the <code>input</code>, <code>select</code>,<code>textarea</code>, <code>label</code>, <code>button</code>,<code>form</code>, <code>fieldset</code>, <code>iframe</code> or<code>isindex</code> elements.</dd><dt><code class="tag">label</code></dt><dd>cannot contain other <code class="tag">label</code> elements.</dd><dt><code class="tag">form</code></dt><dd>cannot contain other <code>form</code> elements.</dd></dl><!--OddPage--><h1><a name="guidelines" id="guidelines">Appendix C.HTML Compatibility Guidelines</a></h1><p><b>This appendix is informative.</b></p><p>This appendix summarizes design guidelines for authors whowish their XHTML documents to render on existing HTML useragents.</p><h2>C.1 Processing Instructions</h2><p>Be aware that processing instructions are rendered on someuser agents. However, also note that when the XML declaration is not includedin a document, the document can only use the default character encodings UTF-8or UTF-16.</p><h2>C.2 Empty Elements</h2><p>Include a space before the trailing <code>/</code> and <code>&gt;</code> of empty elements, e.g. <code class="greenmono">&lt;br&#160;/&gt;</code>, <code class="greenmono">&lt;hr&#160;/&gt;</code> and <code class="greenmono">&lt;imgsrc="karen.jpg" alt="Karen"&#160;/&gt;</code>. Also, use theminimized tag syntax for empty elements, e.g. <code class= "greenmono">&lt;br /&gt;</code>, as the alternative syntax <codeclass="greenmono">&lt;br&gt;&lt;/br&gt;</code> allowed by XMLgives uncertain results in many existing user agents.</p><h2>C.3 Element Minimization and Empty Element Content</h2><p>Given an empty instance of an element whose content model isnot <code>EMPTY</code> (for example, an empty title or paragraph)do not use the minimized form (e.g. use <code class="greenmono">&lt;p&gt; &lt;/p&gt;</code> and not <code class="greenmono">&lt;p&#160;/&gt;</code>).</p><h2>C.4 Embedded Style Sheets and Scripts</h2><p>Use external style sheets if your style sheet uses <code>&lt;</code> or <code>&amp;</code> or <code>]]&gt;</code> or <code>--</code>. Useexternal scripts if your script uses <code>&lt;</code> or <code>&amp;</code> or <code>]]&gt;</code> or <code>--</code>. Note that XML parsersare permitted to silently remove the contents of comments. Therefore, the historicalpractice of "hiding" scripts and style sheets within comments to make thedocuments backward compatible is likely to not work as expected in XML-basedimplementations.</p><h2>C.5 Line Breaks within Attribute Values</h2><p>Avoid line breaks and multiple whitespace characters withinattribute values. These are handled inconsistently by useragents.</p><h2>C.6 Isindex</h2><p>Don't include more than one <code>isindex</code> element inthe document <code>head</code>. The <code>isindex</code> elementis deprecated in favor of the <code>input</code> element.</p><h2>C.7 The <code>lang</code> and <code>xml:lang</code> Attributes</h2><p>Use both the <code>lang</code> and <code>xml:lang</code>attributes when specifying the language of an element. The valueof the <code>xml:lang</code> attribute takes precedence.</p><h2>C.8 Fragment Identifiers</h2><p>In XML, <abbr title="Uniform Resource Identifiers">URIs</abbr> [<a href="#ref-rfc2396">RFC2396</a>] that end with fragment identifiers of the form<code>"#foo"</code> do not refer to elements with an attribute<code>name="foo"</code>; rather, they refer to elements with anattribute defined to be of type <code>ID</code>, e.g., the <code>id</code> attribute in HTML 4.0. Many existing HTML clients don'tsupport the use of <code>ID</code>-type attributes in this way,so identical values may be supplied for both of these attributes to ensuremaximum forward and backward compatibility (e.g., <code class= "greenmono">&lt;a id="foo" name="foo"&gt;...&lt;/a&gt;</code>).</p><p>Further, since the set oflegal values for attributes of type <code>ID</code> is much smaller thanfor those of type <code>CDATA</code>, the type of the <code>name</code>attribute has been changed to <code>NMTOKEN</code>. This attribute is constrained such that it can only have the same values as type<code>ID</code>, or as the <code>Name</code> production in XML 1.0 Section2.5, production 5. Unfortunately, this constraint cannot be expressed in theXHTML 1.0 DTDs.  Because of this change, care must be taken whenconverting existing HTML documents. The values of these attributesmust be unique within the document, valid, and any references to these fragment identifiers (bothinternal and external) must be updated should the values be changed duringconversion.</p><p>Finally, note that XHTML 1.0 has deprecated the<code>name</code> attribute of the <code>a</code>, <code>applet</code>, <code>frame</code>, <code>iframe</code>, <code>img</code>, and <code>map</code>elements, and it will beremoved from XHTML in subsequent versions.</p><h2>C.9 Character Encoding</h2><p>To specify a character encoding in the document, use both theencoding attribute specification on the xml declaration (e.g.<code class="greenmono">&lt;?xml version="1.0"encoding="EUC-JP"?&gt;</code>) and a meta http-equiv statement(e.g. <code class="greenmono">&lt;meta http-equiv="Content-type"content='text/html; charset="EUC-JP"'&#160;/&gt;</code>). Thevalue of the encoding attribute of the xml processing instructiontakes precedence.</p><h2>C.10 Boolean Attributes</h2><p>Some HTML user agents are unable to interpret booleanattributes when these appear in their full (non-minimized) form,as required by XML 1.0. Note this problem doesn't effect useragents compliant with HTML 4.0. The following attributes areinvolved: <code>compact</code>, <code>nowrap</code>, <code>ismap</code>, <code>declare</code>, <code>noshade</code>, <code>checked</code>, <code>disabled</code>, <code>readonly</code>,<code>multiple</code>, <code>selected</code>, <code>noresize</code>, <code>defer</code>.</p><h2>C.11 Document Object Model and XHTML</h2><p>The Document Object Model level 1 Recommendation [<a href="#ref-dom">DOM</a>]defines document object model interfaces for XML and HTML 4.0. The HTML 4.0document object model specifies that HTML element and attribute names arereturned in upper-case. The XML document object model specifies that element and attribute names are returned in the case they are specified. InXHTML 1.0, elements and attributes are specified in lower-case. This apparent difference can beaddressed in two ways:</p><ol><li>Applications that access XHTML documents served as Internet media type<code>text/html</code>via the <abbr title="Document Object Model">DOM</abbr> can use the HTML DOM,and can rely upon element and attribute names being returned inupper-case from those interfaces.</li><li>Applications that access XHTML documents served as Internet media types<code>text/xml</code> or <code>application/xml</code>can also use the XML DOM. Elements and attributes will be returned in lower-case.Also, some XHTML elements may or maynot appearin the object tree because they are optional in the content model(e.g. the <code>tbody</code> element within<code>table</code>).  This occurs because in HTML 4.0 some elements werepermitted to be minimized such that their start and end tags are both omitted(an SGML feature).This is not possible in XML. Rather than require document authors to insertextraneous elements, XHTML has made the elements optional. Applications need to adapt to thisaccordingly.</li></ol><h2>C.12 Using Ampersands in Attribute Values</h2><p>When an attribute value contains an ampersand, it must be expressed as a characterentity reference(e.g. "<code>&amp;amp;</code>"). For example, when the<code>href</code> attributeof the <code>a</code> element refers to aCGI script that takes parameters, it must be expressed as<code>http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;amp;name=user</code>rather than as<code>http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;name=user</code>.</p><h2>C.13 Cascading Style Sheets (CSS) and XHTML</h2><p>The Cascading Style Sheets level 2 Recommendation [<a href="#ref-css2">CSS2</a>] defines styleproperties which are applied to the parse tree of the HTML or XMLdocument.  Differences in parsing will produce different visual oraural results, depending on the selectors used. The following hintswill reduce this effect for documents which are served withoutmodification as both media types:</p><ol><li>CSS style sheets for XHTML should use lower case element andattribute names.</li><li>In tables, the tbody element will be inferred by the parser of anHTML user agent, but not by the parser of an XML user agent. Thereforeyou should always explicitely add a tbody element if it is referred toin a CSS selector.</li><li>Within the XHTML name space, user agents are expected torecognize the "id" attribute as an attribute of type ID.Therefore, style sheets should be able to continue using theshorthand "#" selector syntax even if the user agent does not readthe DTD.</li><li>Within the XHTML name space, user agents are expected torecognize the "class" attribute. Therefore, style sheets should beable to continue using the shorthand "." selector syntax.</li><li>CSS defines different conformance rules for HTML and XML documents;be aware that the HTML rules apply to XHTML documents delivered asHTML and the XML rules apply to XHTML documents delivered as XML.</li></ol><!--OddPage--><h1><a name="acks" id="acks">Appendix D.Acknowledgements</a></h1><p><b>This appendix is informative.</b></p><p>This specification was written with the participation of themembers of the W3C HTML working group:</p><dl><dd>Steven Pemberton, CWI (HTML Working Group Chair)<br />Murray Altheim, Sun Microsystems<br />Daniel Austin, CNET: The Computer Network<br />Frank Boumphrey, HTML Writers Guild<br />John Burger, Mitre<br />Andrew W. Donoho, IBM<br />Sam Dooley, IBM<br />Klaus Hofrichter, GMD<br />Philipp Hoschka, W3C<br />Masayasu Ishikawa, W3C<br />Warner ten Kate, Philips Electronics<br />Peter King, Phone.com<br />Paula Klante, JetForm<br />Shin'ichi Matsui, W3C/Panasonic<br />Shane McCarron, Applied Testing and Technology (The Open Group through August1999)<br />Ann Navarro, HTML Writers Guild<br />Zach Nies, Quark<br />Dave Raggett, W3C/HP (W3C lead for HTML)<br />Patrick Schmitz, Microsoft<br />Sebastian Schnitzenbaumer, Stack Overflow<br />Chris Wilson, Microsoft<br />Ted Wugofski, Gateway 2000<br />Dan Zigmond, WebTV Networks</dd></dl><!--OddPage--><h1><a name="refs" id="refs">Appendix E. References</a></h1><p><b>This appendix is informative.</b></p><dl><dt><a name="ref-css2" id="ref-css2"><b>[CSS2]</b></a></dt><dd><a href="http://www.w3.org/TR/REC-CSS2">"Cascading Style Sheets, level 2 (CSS2) Specification"</a>, B.Bos, H. W. Lie, C. Lilley, I. Jacobs, 12 May 1998.<br />Available at: <a href="http://www.w3.org/TR/REC-CSS2">http://www.w3.org/TR/REC-CSS2</a></dd><dt><a name="ref-dom" id="ref-dom"><b>[DOM]</b></a></dt><dd><a href="http://www.w3.org/TR/REC-DOM-Level-1">"Document Object Model (DOM) Level 1 Specification"</a>, LaurenWood <i>et al.</i>, 1 October 1998.<br />Available at: <a href="http://www.w3.org/TR/REC-DOM-Level-1">http://www.w3.org/TR/REC-DOM-Level-1</a></dd><dt><a name="ref-html4" id="ref-html4"><b>[HTML]</b></a></dt><dd><a href="http://www.w3.org/TR/1999/PR-html40-19990824">"HTML 4.01 Specification"</a>, D. Raggett, A. Le&#160;Hors, I.Jacobs, 24 August 1999.<br />Available at: <a href="http://www.w3.org/TR/1999/PR-html40-19990824">http://www.w3.org/TR/1999/PR-html40-19990824</a></dd><dt><a name="ref-posix" id="ref-posix"><b>[POSIX.1]</b></a></dt><dd>"ISO/IEC 9945-1:1990 Information Technology - PortableOperating System Interface (POSIX) - Part 1: System ApplicationProgram Interface (API) [C Language]", Institute of Electricaland Electronics Engineers, Inc, 1990.</dd><dt><a name="ref-rfc2046" id="ref-rfc2046"><b>[RFC2046]</b></a></dt><dd><a href="http://www.ietf.org/rfc/rfc2046.txt">"RFC2046: Multipurpose Internet Mail Extensions (MIME) PartTwo: Media Types"</a>, N. Freed and N. Borenstein, November1996.<br />Available at <a href="http://www.ietf.org/rfc/rfc2046.txt">http://www.ietf.org/rfc/rfc2046.txt</a>. Note that this RFCobsoletes RFC1521, RFC1522, and RFC1590.</dd><dt><a name="ref-rfc2119" id="ref-rfc2119"><b>[RFC2119]</b></a></dt><dd><a href="http://www.ietf.org/rfc/rfc2119.txt">"RFC2119: Key words for use in RFCs to Indicate RequirementLevels"</a>, S. Bradner, March 1997.<br />Available at: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a></dd><dt><a name="ref-rfc2376" id="ref-rfc2376"><b>[RFC2376]</b></a></dt><dd><a href="http://www.ietf.org/rfc/rfc2376.txt">"RFC2376: XML Media Types"</a>, E. Whitehead, M. Murata, July1998.<br />Available at: <a href="http://www.ietf.org/rfc/rfc2376.txt">http://www.ietf.org/rfc/rfc2376.txt</a></dd><dt><a name="ref-rfc2396" id="ref-rfc2396"><b>[RFC2396]</b></a></dt><dd><a href="http://www.ietf.org/rfc/rfc2396.txt">"RFC2396: Uniform Resource Identifiers (URI): GenericSyntax"</a>, T. Berners-Lee, R. Fielding, L. Masinter, August1998.<br />This document updates RFC1738 and RFC1808.<br />Available at: <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></dd><dt><a name="ref-xml" id="ref-xml"><b>[XML]</b></a></dt><dd><a href="http://www.w3.org/TR/REC-xml">"Extensible Markup Language (XML) 1.0 Specification"</a>, T.Bray, J. Paoli, C. M. Sperberg-McQueen, 10 February 1998.<br />Available at: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></dd><dt><a name="ref-xmlns" id="ref-xmlns"><b>[XMLNAMES]</b></a></dt><dd><a href="http://www.w3.org/TR/REC-xml-names">"Namespaces in XML"</a>, T. Bray, D. Hollander, A. Layman, 14January 1999.<br />XML namespaces provide a simple method for qualifying names usedin XML documents by associating them with namespaces identifiedby URI.<br />Available at: <a href="http://www.w3.org/TR/REC-xml-names">http://www.w3.org/TR/REC-xml-names</a></dd></dl><p><a href="http://www.w3.org/WAI/WCAG1AAA-Conformance"title="Explanation of Level Triple-A Conformance"><img height="32" width="88" src="wcag1AAA.gif"alt="Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" /></a></p><div class="navbar">  <hr />  <a href="#toc">table of contents</a> </div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -