Xhtml 简明教程
XHTML - Summary
我们假设您理解了与 XHTML 相关的所有概念。因此,您应该能够将 HTML 文档编写到一个格式良好的 XHTML 文档中,并获得更干净的网站版本。
We assume you have understood all the concepts related to XHTML. Therefore, you should be able to write your HTML document into a well-formed XHTML document and get a cleaner version of your website.
Converting HTML to XHTML
您可以将现有的 HTML 网站转换为 XHTML 网站。
You can convert your existing HTML website into XHTML website.
让我们回顾一些重要的步骤。要转换现有的文档,您必须首先决定要遵守哪个 DTD,并在文档顶部包括文档类型定义。
Let us go through some important steps. To convert your existing document, you must first decide which DTD you are going to adhere to, and include document type definition at the top of the document.
-
Make sure you have all other required elements. These include a root element <html> that indicates an XML namespace, a <head> element, a <title> element contained within the <head> element, and a <body> element.
-
Convert all element keywords and attribute names to lowercase.
-
Ensure that all attributes are in a name="value" format.
-
Make sure that all container elements have closing tags.
-
Place a forward slash inside all standalone elements. For example, rewrite all <br> elements as <br />.
-
Designate client-side script code and style sheet code as CDATA sections.
XHTML Upcoming Versions
XHTML 仍在改进中,其下一版本 XHTML 1.1 已进入草案阶段。我们在 XHTML 版本 1.1 章节详细讨论了这一点。
Still XHTML is being improved and its next version XHTML 1.1 has been drafted. We have discussed this in detail in XHTML Version 1.1 chapter.
XHTML Tags, Characters, and Entities
XHTML 标签、字符和实体与 HTML 相同,因此,如果您已经了解 HTML,那么您不需要额外努力来学习这些学科,特别是对于 XHTML。我们已经列出了所有 HTML 内容,以及 XHTML 教程,因为它们也适用于 XHTML。
XHTML tags, characters, and entities are same as HTML, so if you already know HTML then you do not need to put extra effort to learn these subjects, especially for XHTML. We have listed out all HTML stuff along with XHTML tutorial also, because they are applicable to XHTML as well.
What is Next?
我们列出了 XHTML 和 HTML 的各种资源,因此,如果您有兴趣并且有时间,我们建议您阅读这些资源以增强您对 XHTML 的理解。否则,本教程一定为您提供了足够的知识,可以使用 XHTML 来编写您的网页。
We have listed out various resources for XHTML and HTML so if you are interested and you have time in hand, then we recommend you to go through these resources to enhance your understanding on XHTML. Otherwise this tutorial must have given you enough knowledge to write your web pages using XHTML.
您对本教程的反馈欢迎通过 contact@tutorialspoint.com 发送。
Your feedback on this tutorial is welcome at contact@tutorialspoint.com.