婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > XHTML與HTML之間的區別

XHTML與HTML之間的區別

熱門標簽:電銷機器人的宣傳語 南通電話外呼系統開發 江西防封卡外呼系統怎么安裝 石家莊電話機器人電話 400電話辦理安徽 電銷智能機器人靠譜么 北京銷售外呼系統線路 南寧外呼電銷系統招商 沸思外呼線路

翻譯:Linyupark

You can prepare yourself for XHTML by starting to write strict HTML.
你可以開始通過書寫嚴格的HTML代碼來為你的XHML之行做好準備


--------------------------------------------------------------------------------

How To Get Ready For XHTML
如何為XHTML做準備呢?
XHTML is the next generation of HTML, but it will of course take some time before browsers and other software products are ready for it.
XHTML是HTML的下一代語言,但它將理所當然的在新的瀏覽器和其他的相關軟件產品出現之前延遲一段時間才能普及。

In the meantime there are some important things you can do to prepare yourself for it. As you will learn from this tutorial, XHTML is not very different from HTML 4.01, so bringing your code up to 4.01 standards is a very good start. Our complete HTML 4.01 reference can help you with that.
其間,去做一些重要的事情來為它做準備。就像你可以從這教程學到東西一樣,XHTML與HTML4.01相差不多,所以把你的代碼改寫成符合HTML4.01標準是一種非常好的開始,我們完整的HTML4.01參考可以幫助你解決這個問題。

In addition, you should start NOW to write your HTML code in lowercase letters, and NEVER make the bad habit of skipping end tags like the /p>.
另外,現在你應該開始用小寫字母來書寫你的HTML代碼,并且永遠不要再像以前那樣有跳過像/p>這樣的結尾標簽的壞習慣。

Happy coding!
快樂的編碼!


--------------------------------------------------------------------------------

The Most Important Differences:
非常重要的區別:
XHTML elements must be properly nested
XHTML元素必須合理嵌套
XHTML documents must be well-formed
XHTML文檔必須格式正確
Tag names must be in lowercase
標簽名稱必須是小寫
All XHTML elements must be closed
所有XHTML元素必須關閉

--------------------------------------------------------------------------------

Elements Must Be Properly Nested
元素必須合理嵌套
In HTML some elements can be improperly nested within each other like this:
在HTML中一些元素可以不使用正確的相互嵌套像這樣:

b>i>This text is bold and italic/b>/i>In XHTML all elements must be properly nested within each other like this:
在XHTML所有元素必須合理的相互嵌套像這樣:

b>i>This text is bold and italic/i>/b>Note: A common mistake in nested lists, is to forget that the inside list must be within a li element, like this:
注意:在列表嵌套的時候經常會犯一個錯誤,就是忘記了在列表中插入的新列表必須在一個li>標記中,像這樣:

ul>
  li>Coffee/li>
  li>Tea
    ul>
      li>Black tea/li>
      li>Green tea/li>
    /ul>
  li>Milk/li>
/ul>This is correct:
這才是正確的:

ul>
  li>Coffee/li>
  li>Tea
    ul>
      li>Black tea/li>
      li>Green tea/li>
    /ul>
  /li>
  li>Milk/li>
/ul>Notice that we have inserted a /li> tag after the /ul> tag in the "correct" code example.
在這段正確的代碼示例中,要注意在/ul>之后加了一個/li>標簽


--------------------------------------------------------------------------------

Documents Must Be Well-formed
文檔格式必須合格
All XHTML elements must be nested within the html> root element. All other elements can have sub (children) elements. Sub elements must be in pairs and correctly nested within their parent element. The basic document structure is:
所有的XHTML標記必須被嵌套使用在html> 根標簽之中。所有其他的標簽可以有自己的子標簽。位于父標簽之內的子標簽也必須成對且正確的嵌套使用。一個網頁的基本結構是:

html>
head> ... /head>
body> ... /body>
/html>

--------------------------------------------------------------------------------

Tag Names Must Be In Lower Case
標簽名稱必須是小寫
This is because XHTML documents are XML applications. XML is case-sensitive. Tags like br> and BR> are interpreted as different tags.
這是因為XHTML文檔是XML應用程序,XML是區分大小寫的,像br>和BR>會被認為是兩種不同的標簽。

This is wrong:
這是錯誤的:

BODY>
P>This is a paragraph/P>
/BODY>This is correct:
這是正確的:

body>
p>This is a paragraph/p>
/body>

--------------------------------------------------------------------------------

All XHTML Elements Must Be Closed
所有的XHTML元素必須關閉
Non-empty elements must have an end tag.
非空元素必須有關閉標簽。

This is wrong:
這是錯誤的:

p>This is a paragraph
p>This is another paragraphThis is correct:
正確是這樣:

p>This is a paragraph/p>
p>This is another paragraph/p>

--------------------------------------------------------------------------------

Empty Elements Must Also Be Closed
空的元素也必須關閉
Empty elements must either have an end tag or the start tag must end with />.
空的元素也必須有一個結束標簽或者開始標簽用/>結束。

This is wrong:
這是錯誤的:

This is a breakbr>
Here comes a horizontal rule:hr>
Here''''s an image img src="happy.gif" alt="Happy face">This is correct:
這是正確的:

This is a breakbr />

Here comes a horizontal rule:hr />Here''''s an image img src="happy.gif" alt="Happy face" />
IMPORTANT Compatibility Note:
注意兼容性的關鍵:
To make your XHTML compatible with today''''s browsers, you should add an extra space before the "/" symbol like this: br  />, and this: hr  />.
為了使你的XHTML能夠兼容現在的瀏覽器,你必須在/符號之前加一個特殊的空格,就像這樣:br  />和這樣:hr  />

標簽:寧夏 衢州 陽泉 鹽城 云南 晉中 來賓 北海

巨人網絡通訊聲明:本文標題《XHTML與HTML之間的區別》,本文關鍵詞  XHTML,與,HTML,之,間的,區別,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《XHTML與HTML之間的區別》相關的同類信息!
  • 本頁收集關于XHTML與HTML之間的區別的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 泰宁县| 临洮县| 深圳市| 马龙县| 涞源县| 甘孜| 杂多县| 柏乡县| 杭锦后旗| 郓城县| 宁强县| 宁国市| 晋中市| 通辽市| 云浮市| 丰县| 德清县| 台江县| 景洪市| 新宁县| 普格县| 大英县| 安岳县| 论坛| 英吉沙县| 遂川县| 淅川县| 佳木斯市| 会宁县| 盐边县| 德化县| 绥中县| 永泰县| 安康市| 贡山| 保靖县| 万载县| 墨脱县| 鹤峰县| 连云港市| 佛冈县|