国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

干凈的XHTML語法

2019-10-26 17:22:01
字體:
來源:轉載
供稿:網友
Writing XHTML demands a clean HTML syntax.
寫XHTML要求使用干凈的HTML語法
--------------------------------------------------------------------------------
Some More XHTML Syntax Rules:
更多XHTML語法規則:
Attribute names must be in lower case
屬性名稱必須為小寫
Attribute values must be quoted
屬性值使用雙引號
Attribute minimization is forbidden
屬性簡寫是不允許的
The id attribute replaces the name attribute
用id屬性來替代name屬性
The XHTML DTD defines mandatory elements
XHTML DTD定義強制元素
--------------------------------------------------------------------------------
Attribute Names Must Be In Lower Case
屬性名稱必須為小寫
This is wrong:
這是錯誤的:
<table WIDTH="100%">This is correct:
這是正確的:
<table width="100%">
--------------------------------------------------------------------------------
Attribute Values Must Be Quoted
屬性值必須帶上雙引號
This is wrong:
這是錯誤的:
<table width=100%>This is correct:
這是正確的:
<table width="100%">
--------------------------------------------------------------------------------
Attribute Minimization Is Forbidden
不允許屬性簡寫
This is wrong:
這是錯誤的:
<input checked>
<input readonly>
<input disabled>
<option selected>
<frame noresize>This is correct:
正確的是這樣:
<input checked="checked" />
<input readonly="readonly" />
<input disabled="disabled" />
<option selected="selected" />
<frame noresize="noresize" />Here is a list of the minimized attributes in HTML and how they should be written in XHTML:
這是在HTML中簡寫的屬性和其在XHTML中應該怎樣書寫的列表:
HTML XHTML
compact compact="compact"
checked checked="checked"
declare declare="declare"
readonly readonly="readonly"
disabled disabled="disabled"
selected selected="selected"
defer defer="defer"
ismap ismap="ismap"
nohref nohref="nohref"
noshade noshade="noshade"
nowrap nowrap="nowrap"
multiple multiple="multiple"
noresize noresize="noresize"

--------------------------------------------------------------------------------
The id Attribute Replaces The name Attribute
id屬性替換name屬性
HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.
對于a, applet, frame, iframe, img和map,HTML 4.01中定義了一個name屬性,在XHTML中是不贊成這樣做的,使用id來代替。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 平乡县| 绥中县| 河源市| 大渡口区| 湾仔区| 苏尼特右旗| 凉城县| 肇源县| 鄯善县| 都匀市| 阿坝| 新蔡县| 郓城县| 亚东县| 达州市| 白朗县| 富锦市| 红桥区| 崇州市| 宁海县| 广河县| 石棉县| 潍坊市| 杂多县| 扶余县| 独山县| 嘉鱼县| 云龙县| 教育| 壶关县| 鄂尔多斯市| 阿瓦提县| 荣成市| 广丰县| 东乌珠穆沁旗| 会宁县| 林口县| 辽宁省| 邮箱| 长宁区| 鱼台县|