建立自己的操作標(biāo)準(zhǔn):XHTML代碼
[ 2006-06-04 07:38:54 | Author:
greengnn ]
小毅已經(jīng)整理很很多了,但是沒(méi)有針對(duì)DW的,我個(gè)人比較喜歡DW,界面美觀方便,而且提供多種瀏覽器預(yù)覽,做法就是將常用的XHTML代碼作成存入DW的剪輯庫(kù),不需要的部分就刪除掉,現(xiàn)在還在整理中,先列出一部分,也希望大家給以補(bǔ)充。
TOP Code/頭部代碼
<!--(1)過(guò)渡型(Transitional )-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--(2)嚴(yán)格型(Strict )-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--(3)框架型(Frameset )-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<!--設(shè)定一個(gè)名字空間(Namespace)lang="zh-CN"/-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<!--聲明你的編碼語(yǔ)言:GB2312/UTF-8/Unicode/ISO-8859-1-->
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<!--為搜索引擎準(zhǔn)備的內(nèi)容-->
<!--允許搜索機(jī)器人搜索站內(nèi)所有鏈接。如果你想某些頁(yè)面不被搜索,推薦采用robots.txt方法-->
<meta content="all" name="robots" />
<!--設(shè)置站點(diǎn)作者信息-->
<meta name="author" content="ajie@netease.com,阿捷" />
<!--設(shè)置站點(diǎn)版權(quán)信息-->
<meta name="Copyright" content="www.w3cn.org,自由版權(quán),任意轉(zhuǎn)載" />
<!--站點(diǎn)的簡(jiǎn)要介紹(推薦)-->
<meta name="description" content="新網(wǎng)頁(yè)設(shè)計(jì)師。web標(biāo)準(zhǔn)的教程站點(diǎn),推動(dòng)web標(biāo)準(zhǔn)在中國(guó)的應(yīng)用" />
<!--站點(diǎn)的關(guān)鍵詞(推薦)-->
<meta content="designing, with, web, standards, xhtml, css, graphic, design, layout, usability, ccessibility, w3c, w3, w3cn, ajie" name="keywords" />
<!--收藏夾小圖標(biāo)-->
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<title>網(wǎng)頁(yè)標(biāo)題</title>
<!--連接樣式表-->
<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
<style type="text/css" media="all">@import url( css/style01.css );</style>
<!--RSS-->
<link rel="alternate" type="application/rss+xml" title="greengnn's space" />
<!--JS-->
<script src="js/common.js" type="text/javascript" language="javascript" "></script>
</head>
<body></body>
</html>
Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<meta name="author" content="ajie33(at)gmail.com,阿捷" />
<meta name="Copyright" content="www.w3cn.org,自由版權(quán),任意轉(zhuǎn)載" />
<meta name="description" content="新網(wǎng)頁(yè)設(shè)計(jì)師,web標(biāo)準(zhǔn)的教程站點(diǎn),推動(dòng)web標(biāo)準(zhǔn)在中國(guó)的應(yīng)用." />
<meta content="web標(biāo)準(zhǔn),web標(biāo)準(zhǔn)教程,網(wǎng)站重構(gòu), css布局, xhtml, css,xhtml+css,layout, usability, w3cn, CSS+DIV" name="keywords" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" type="image/x-icon" />
<title>網(wǎng)頁(yè)設(shè)計(jì)師:怎樣過(guò)渡</title>
<!-- 調(diào)用樣式表 -->
<link rel="stylesheet" type="text/css" media="all" charset="utf-8"/>
</head>
<body id="w3cn">
</body>
</html>
</code>
Flash嵌入代碼
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="300" height="120">
<param name="movie" value="http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#FFFFFF">
<!--[if !IE]> <-->
<object data="http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.swf" width="300" height="120" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="bgcolor" value="#FFFFFF">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]-->
</object>
fildset & legend:fildset套在表單外,legend用于描述表單內(nèi)容。
<form>
<fildset>
<legend>title</legend>
<label for="user-password">密 碼</label>
<input type="password" name="password" id="user-password" />
</fieldset>
</form>
dl,dt,dd:當(dāng)頁(yè)面中出現(xiàn)第一行為類(lèi)似標(biāo)題/簡(jiǎn)述,然后下面為詳細(xì)描述的內(nèi)容時(shí)應(yīng)該使用該標(biāo)簽
<dl>
<dt></dt>
<dd></dd>
<dt></dt>
<dd></dd>
</dl>
ul,li無(wú)序列表
<ul>
<li></li>
<li></li>
</ul>
ol,li有序列表
<ol>
<li></li>
<li></li>
</ol>
table表格
<table id="mytable" cellspacing="0" summary="The technical specifications of the Apple PowerMac G5 series">
<caption>Table 1: Power Mac G5 tech specs </caption>
<tr>
<th scope="col" abbr="Configurations" class="nobg">Configurations</th>
<th scope="col" abbr="Dual 1.8">Dual 1.8GHz</th>
<th scope="col" abbr="Dual 2">Dual 2GHz</th>
<th scope="col" abbr="Dual 2.5">Dual 2.5GHz</th>
</tr>
<tr>
<th scope="row" abbr="Model" class="spec">Model</th>
<td>M9454LL/A</td>
<td>M9455LL/A</td>
<td>M9457LL/A</td>
</tr>
<tr>
<th scope="row" abbr="G5 Processor" class="specalt">G5 Processor</th>
<td class="alt">Dual 1.8GHz PowerPC G5</td>
<td class="alt">Dual 2GHz PowerPC G5</td>
<td class="alt">Dual 2.5GHz PowerPC G5</td>
</tr>
<tr>
<th scope="row" abbr="Frontside bus" class="spec">Frontside bus</th>
<td>900MHz per processor</td>
<td>1GHz per processor</td>
<td>1.25GHz per processor</td>
</tr>
<tr>
<th scope="row" abbr="L2 Cache" class="specalt">Level2 Cache</th>
<td class="alt">512K per processor</td>
<td class="alt">512K per processor</td>
<td class="alt">512K per processor</td>
</tr>
</table>