📄 xhtml1.xhtml
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "dtds/xhtml1-strict.dtd"><?xml-stylesheet href="W3C-PR.css" type="text/css"?><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>XHTML 1.0: The Extensible HyperText MarkupLanguage</title><link rel="stylesheet"href="W3C-PR.css" type="text/css" /><style type="text/css">span.term { font-style: italic; color: rgb(0, 0, 192) }code { color: green; font-family: monospace; font-weight: bold;}code.greenmono { color: green; font-family: monospace; font-weight: bold;}.good { border: solid green; border-width: 2px; color: green; font-weight: bold; margin-right: 5%; margin-left: 0;}.bad { border: solid red; border-width: 2px; margin-left: 0; margin-right: 5%; color: rgb(192, 101, 101);}img { color: white; border: none;}div.navbar { text-align: center; }div.contents { background-color: rgb(204,204,255); padding: 0.5em; border: none; margin-right: 5%;}.tocline { list-style: none; }table.exceptions { background-color: rgb(255,255,153); }</style></head><body><div class="navbar"> <a href="#toc">table of contents</a> <hr /></div><div class="head"><p><a href="http://www.w3.org/"><img class="head"src="w3c_home.gif" alt="W3C" /></a></p><h1 class="head"><a name="title" id="title">XHTML</a><sup>™</sup> 1.0:The Extensible HyperText Markup Language</h1><h2>A Reformulation of HTML 4.0 in XML 1.0</h2><h3>W3C Proposed Recommendation 10 December 1999</h3><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/1999/PR-xhtml1-19991210">http://www.w3.org/TR/1999/PR-xhtml1-19991210</a> <br />(<a href="xhtml1.ps">Postscript version</a>,<a href="xhtml1.pdf">PDF version</a>,<a href="xhtml1.zip">ZIP archive</a>, or<a href="xhtml1.tgz">Gzip'd TAR archive</a>)</dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/xhtml1">http://www.w3.org/TR/xhtml1</a></dd><dt>Previous versions:</dt><dd><a href="http://www.w3.org/TR/1999/WD-xhtml1-19991124">http://www.w3.org/TR/1999/WD-xhtml1-19991124</a></dd><dd><a href="http://www.w3.org/TR/1999/PR-xhtml1-19990824">http://www.w3.org/TR/1999/PR-xhtml1-19990824</a></dd><dt>Authors:</dt><dd>See <a href="#acks">acknowledgements</a>.</dd></dl><p class="copyright"><a href= "http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1999 <a href="http://www.w3.org/">W3C</a><sup>®</sup>(<a href="http://www.lcs.mit.edu/">MIT</a>, <a href= "http://www.inria.fr/">INRIA</a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <abbrtitle="World Wide Web Consortium">W3C</abbr> <ahref= "http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href= "http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a href= "http://www.w3.org/Consortium/Legal/copyright-documents">documentuse</a> and <a href= "http://www.w3.org/Consortium/Legal/copyright-software">softwarelicensing</a> rules apply.</p><hr /></div><h2 class="notoc">Abstract</h2><p>This specification defines <abbr title="Extensible Hypertext MarkupLanguage">XHTML</abbr> 1.0, a reformulation of HTML4.0 as an XML 1.0 application, and three <abbr title="Document TypeDefinition">DTDs</abbr> corresponding tothe ones defined by HTML 4.0. The semantics of the elements andtheir attributes are defined in the W3C Recommendation for HTML4.0. These semantics provide the foundation for futureextensibility of XHTML. Compatibility with existing HTML useragents is possible by following a small set of guidelines.</p><h2>Status of this document</h2><p><em>This section describes the status of this document at the timeof its publication. Other documents may supersede this document. Thelatest status of this document series is maintained at the W3C.</em></p><p>This specification is a Proposed Recommendation of the HTML Working Group. It is a revision of the Proposed Recommendation dated <ahref= "http://www.w3.org/TR/1999/PR-xhtml1-19990824/">24 August1999</a> incorporating changes as a result of comments from the ProposedRecommendation review, and comments and further deliberations of the W3C HTML Working Group. A <a href="xhtml1-diff-19991210.html">diff-marked version</a> from the previousproposed recommendation is available for comparison purposes.</p><p>On 10 December 1999, this document enters a<a href="http://www.w3.org/Consortium/Process/#RecsPR">Proposed Recommendation</a> review period. From that date until 8 January2000,W3C Advisory Committee representatives are encouragedto review this specification and return comments in their completedballots to w3c-html-review@w3.org. Please send any comments of aconfidential nature in separate email to w3t-html@w3.org, which isvisible to the Team only.</p><p>No sooner than 14 days after the end of the review period, theDirector will announce the document's disposition: it may become a W3CRecommendation (possibly with minor changes), it may revert to WorkingDraft status, or it may be dropped as a W3C work item.</p><p>Publication as a Proposed Recommendation does not imply endorsementby the W3C membership. This is still a draft document and may beupdated, replaced or obsoleted by other documents at any time. It isinappropriate to cite W3C Proposed Recommendation as other than "workin progress."</p><p>This document has been produced as part of the <a href= "http://www.w3.org/MarkUp/">W3C HTML Activity</a>. The goals ofthe <a href="http://www.w3.org/MarkUp/Group/">HTML WorkingGroup</a> <i>(<a href="http://cgi.w3.org/MemberAccess/">membersonly</a>)</i> are discussed in the <a href= "http://www.w3.org/MarkUp/Group/HTMLcharter">HTML Working Groupcharter</a> <i>(<a href="http://cgi.w3.org/MemberAccess/">membersonly</a>)</i>.</p><p>A list of current W3C Recommendations and other technical documentscan be found at <ahref="http://www.w3.org/TR">http://www.w3.org/TR</a>.</p><p>Public discussion on <abbr title="HyperText MarkupLanguage">HTML</abbr> features takes place on the mailing list <ahref="mailto:www-html@w3.org"> www-html@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-html/">archive</a>). The W3Cstaff contact for work on HTML is <a href= "mailto:dsr@w3.org">DaveRaggett</a>.</p><p>Please report errors in this document to <ahref="mailto:www-html-editor@w3.org">www-html-editor@w3.org</a>.</p><p>The list of known errors in this specification is available at <ahref="http://www.w3.org/1999/12/PR-xhtml1-19991210-errata">http://www.w3.org/1999/12/PR-xhtml1-19991210-errata</a>.</p><h2 class="notoc"><a id="toc" name="toc">Contents</a></h2><div class="contents"><ul class="toc"><li class="tocline">1. <a href="#xhtml">What is XHTML?</a> <ul class="toc"><li class="tocline">1.1 <a href="#html4">What is HTML 4.0?</a></li><li class="tocline">1.2 <a href="#xml">What is XML?</a></li><li class="tocline">1.3 <a href="#why">Why the need for XHTML?</a></li></ul></li><li class="tocline">2. <a href="#defs">Definitions</a> <ul class="toc"><li class="tocline">2.1 <a href="#terms">Terminology</a></li><li class="tocline">2.2 <a href="#general">General Terms</a></li></ul></li><li class="tocline">3. <a href="#normative">Normative Definition of XHTML 1.0</a><ul class="toc"><li class="tocline">3.1 <a href="#docconf">Document Conformance</a></li><li class="tocline">3.2 <a href="#uaconf">User Agent Conformance</a></li></ul></li><li class="tocline">4. <a href="#diffs">Differences with HTML 4.0</a> </li><li class="tocline">5. <a href="#issues">Compatibility Issues</a> <ul class="toc"><li class="tocline">5.1 <a href="#media">Internet Media Types</a></li></ul></li><li class="tocline">6. <a href="#future">Future Directions</a> <ul class="toc"><li class="tocline">6.1 <a href="#mods">Modularizing HTML</a></li><li class="tocline">6.2 <a href="#extensions">Subsets and Extensibility</a></li><li class="tocline">6.3 <a href="#profiles">Document Profiles</a></li></ul></li><li class="tocline"><a href="#dtds">Appendix A. DTDs</a></li><li class="tocline"><a href="#prohibitions">Appendix B. ElementProhibitions</a></li><li class="tocline"><a href="#guidelines">Appendix C. HTML Compatibility Guidelines</a></li><li class="tocline"><a href="#acks">Appendix D. Acknowledgements</a></li><li class="tocline"><a href="#refs">Appendix E. References</a></li></ul></div><!--OddPage--><h1><a name="xhtml" id="xhtml">1. What is XHTML?</a></h1><p>XHTML is a family of current and future document types and modules thatreproduce, subset, and extend HTML 4.0 <a href="#ref-html4">[HTML]</a>. XHTML family document types are <abbr title="Extensible Markup Language">XML</abbr> based,and ultimately are designed to work in conjunction with XML-based user agents.The details of this family and its evolution arediscussed in more detail in the section on <a href="#future">FutureDirections</a>. </p><p>XHTML 1.0 (this specification) is the first document type in the XHTMLfamily. It is a reformulation of the three HTML 4.0 document types asapplications of XML 1.0 <a href="#ref-xml"> [XML]</a>. It is intendedto be used as a language for content that is both XML-conforming and, if somesimple <a href="#guidelines">guidelines</a> are followed, operates in HTML 4.0 conforming user agents. Developers who migratetheir content to XHTML 1.0 will realize the following benefits:</p><ul><li>XHTML documents are XML conforming. As such, they are readily viewed,edited, and validated with standard XML tools.</li><li>XHTML documents can be written toto operate as well or better than they did before in existingHTML 4.0-conforming user agents as well as in new, XHTML 1.0 conforming useragents.</li><li>XHTML documents can utilize applications (e.g. scripts and applets) that relyupon either the HTML Document Object Model or the XML Document Object Model <ahref="#ref-dom">[DOM]</a>.</li><li>As the XHTML family evolves, documents conforming to XHTML 1.0 will be morelikely to interoperate within and among various XHTML environments.</li></ul><p>The XHTML family is the next step in the evolution of the Internet. Bymigrating to XHTML today, content developers can enter the XML world with allof its attendant benefits, while still remaining confident in theircontent's backward and future compatibility.</p><h2><a name="html4" id="html4">1.1 What is HTML 4.0?</a></h2><p>HTML 4.0 <a href="#ref-html4">[HTML]</a> is an <abbr title="StandardGeneralized Markup Language">SGML</abbr> (StandardGeneralized Markup Language) application conforming toInternational Standard <abbr title="Organization for InternationalStandardization">ISO</abbr> 8879, and is widely regarded as thestandard publishing language of the World Wide Web.</p><p>SGML is a language for describing markup languages,particularly those used in electronic document exchange, documentmanagement, and document publishing. HTML is an example of alanguage defined in SGML.</p><p>SGML has been around since the middle 1980's and has remainedquite stable. Much of this stability stems from the fact that thelanguage is both feature-rich and flexible. This flexibility,however, comes at a price, and that price is a level ofcomplexity that has inhibited its adoption in a diversity ofenvironments, including the World Wide Web.</p><p>HTML, as originally conceived, was to be a language for theexchange of scientific and other technical documents, suitablefor use by non-document specialists. HTML addressed the problemof SGML complexity by specifying a small set of structural andsemantic tags suitable for authoring relatively simple documents.In addition to simplifying the document structure, HTML addedsupport for hypertext. Multimedia capabilities were addedlater.</p><p>In a remarkably short space of time, HTML became wildlypopular and rapidly outgrew its original purpose. Since HTML'sinception, there has been rapid invention of new elements for usewithin HTML (as a standard) and for adapting HTML to vertical,highly specialized, markets. This plethora of new elements hasled to compatibility problems for documents across differentplatforms.</p><p>As the heterogeneity of both software and platforms rapidlyproliferate, it is clear that the suitability of 'classic' HTML4.0 for use on these platforms is somewhat limited.</p><h2><a name="xml" id="xml">1.2 What is XML?</a></h2><p>XML<sup>™</sup> is the shorthand for Extensible MarkupLanguage, and is an acronym of Extensible Markup Language <ahref="#ref-xml">[XML]</a>.</p><p>XML was conceived as a means of regaining the power andflexibility of SGML without most of its complexity. Although arestricted form of SGML, XML nonetheless preserves most of SGML'spower and richness, and yet still retains all of SGML's commonlyused features.</p><p>While retaining these beneficial features, XML removes many ofthe more complex features of SGML that make the authoring anddesign of suitable software both difficult and costly.</p><h2><a name="why" id="why">1.3 Why the need for XHTML?</a></h2><p>The benefits of migrating to XHTML 1.0 are described above. Some of thebenefits of migrating to XHTML in general are:</p><ul><li>Document developers and user agent designers are constantlydiscovering new ways to express their ideas through new markup. In XML, it isrelatively easy to introduce new elements or additional elementattributes. The XHTML family is designed to accommodate these extensionsthrough XHTML modules and techniques for developing new XHTML-conformingmodules (described in the forthcoming XHTML Modularization specification).These modules will permit the combination of existing andnew feature sets when developing content and when designing new useragents.</li><li>Alternate ways of accessing the Internet are constantly beingintroduced. Some estimates indicate that by the year 2002, 75% ofInternet document viewing will be carried out on these alternateplatforms. The XHTML family is designed with general user agentinteroperability in mind. Through a new user agent and document profiling
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -