HTMLDOCTYPEDefinitionandUsage-doctype的定義及用法_XHTML教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
The <!DOCTYPE> declaration is the very first thing in your document, before the <html> tag. This tag tells the browser which HTML or XHTML specification the document uses.
Note: The <!DOCTYPE> tag does not have an end tag!
HTML
HTML 4.01 specifies three document types: Strict, Transitional, and Frameset.
HTML Strict DTD
Use this when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):
HTML Transitional DTD
The Transitional DTD includes presentation attributes and elements that W3C expects to move to a style sheet. Use this when you need to use HTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):
Frameset DTD
The Frameset DTD should be used for documents with frames. The Frameset DTD is equal to the Transitional DTD except for the frameset element replaces the body element:
XHTML
XHTML 1.0 specifies three XML document types: Strict, Transitional, and Frameset.
XHTML Strict DTD
Use this DTD when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):
XHTML Transitional DTD
Use this DTD when you need to use XHTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):
XHTML Frameset DTD
Use this DTD when you want to use frames!
To check that you have written a valid XHTML document with a correct DTD, you can link your XHTML page to an XHTML validator.
Note: The <!DOCTYPE> tag does not have an end tag!
HTML
HTML 4.01 specifies three document types: Strict, Transitional, and Frameset.
HTML Strict DTD
Use this when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):
示例代碼 [hl5o.cn]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML Transitional DTD
The Transitional DTD includes presentation attributes and elements that W3C expects to move to a style sheet. Use this when you need to use HTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):
示例代碼 [hl5o.cn]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Frameset DTD
The Frameset DTD should be used for documents with frames. The Frameset DTD is equal to the Transitional DTD except for the frameset element replaces the body element:
示例代碼 [hl5o.cn]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
XHTML
XHTML 1.0 specifies three XML document types: Strict, Transitional, and Frameset.
XHTML Strict DTD
Use this DTD when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):
示例代碼 [hl5o.cn]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML Transitional DTD
Use this DTD when you need to use XHTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):
示例代碼 [hl5o.cn]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML Frameset DTD
Use this DTD when you want to use frames!
示例代碼 [hl5o.cn]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
To check that you have written a valid XHTML document with a correct DTD, you can link your XHTML page to an XHTML validator.
相關(guān)XHTML教程:
- HTML5 INPUT placeholder及兼容性處理
- HTML表單里的Label標(biāo)簽
- 淺析HTML與javascript中常用編碼
- CSS網(wǎng)頁布局中必須要了解的幾個(gè)XHTML標(biāo)簽
- title和alt 標(biāo)簽介紹及其異同
- 淺析HTML標(biāo)簽strong和em的區(qū)別
- 說說XHTML中的alt屬性和title屬性
- Semantics語義是Html Xhtml是否真正符合標(biāo)準(zhǔn)的重要部分
- 九個(gè)W3C XHTML1.0及CSS標(biāo)準(zhǔn)認(rèn)證需要注意的問題
- 請(qǐng)注意頁面head區(qū)域的編碼是不是規(guī)范
- HTML validate - 驗(yàn)證HTML代碼穿越多重瀏覽器標(biāo)準(zhǔn)
- XHTML具有語義的標(biāo)簽:有關(guān)H1位置的討論
XHTML教程Rss訂閱Div+Css教程搜索
XHTML教程推薦
- XHTML入門學(xué)習(xí)教程:表格標(biāo)簽的應(yīng)用
- HTML表格標(biāo)記教程(5):亮邊框色屬性BORDERCOLORLIGHT
- 網(wǎng)頁制作中使用規(guī)范的HTML代碼的幾點(diǎn)
- XHTMLDHTMLSHTML到底是什么,有何區(qū)別?
- 制作符合Web標(biāo)準(zhǔn)的超鏈接
- HTML5isnowalsohostedbytheW3C
- 請(qǐng)注意頁面head區(qū)域的編碼是不是規(guī)范
- HTML打造極具親和力的表單
- XHTML教程:Doctype文檔類型聲明必不可少!
- DIV CSS布局基礎(chǔ):HTML標(biāo)記(一)
- 相關(guān)鏈接:
- 教程說明:
XHTML教程-HTMLDOCTYPEDefinitionandUsage-doctype的定義及用法
。