分享
 
 
 

web标准实现高效开发系列之二

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

web标准让大家学会了手写代码,显然这样的效率不够高。关于高效开发早已提到了web标准推广的日程上来了,可是现在的成效还不是很让人满意,我个人观点,开发的时候从整体到局部,提高开发效率的时候要从局部到整体,因为这是一种组装,比如head区域,文章显示块,内容列表块,表单块......让你的代码复用起来。

小毅已经整理很很多了,但是没有针对DW的,我个人比较喜欢DW,界面美观方便,而且提供多种浏览器预览,做法就是将常用的XHTML代码作成存入DW的剪辑库,不需要的部分就删除掉,现在还在整理中,先列出一部分,也希望大家给以补充。

TOP Code/头部代码

<!--(1)过渡型(Transitional )-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--(2)严格型(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">

<!--设定一个名字空间(Namespace)lang="zh-CN"/-->

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

<head>

<!--声明你的编码语言: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" />

<!--为搜索引擎准备的内容-->

<!--允许搜索机器人搜索站内所有链接。如果你想某些页面不被搜索,推荐采用robots.txt方法-->

<meta content="all" name="robots" />

<!--设置站点作者信息-->

<meta name="author" content="ajie@netease.com,阿捷" />

<!--设置站点版权信息-->

<meta name="Copyright" content="www.w3cn.org,自由版权,任意转载" />

<!--站点的简要介绍(推荐)-->

<meta name="description" content="新网页设计师。web标准的教程站点,推动web标准在中国的应用" />

<!--站点的关键词(推荐)-->

<meta content="designing, with, web, standards, xhtml, css, graphic, design, layout, usability, ccessibility, w3c, w3, w3cn, ajie" name="keywords" />

<!--收藏夹小图标-->

<link rel="icon" href="/favicon.ico" type="image/x-icon" />

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

<title>网页标题</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&#39;s space" href="http://www.jluvip.com/blog/feed.asp" />

<!--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,自由版权,任意转载" />

<meta name="description" content="新网页设计师,web标准的教程站点,推动web标准在中国的应用." />

<meta content="web标准,web标准教程,网站重构, 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" href="http://www.w3cn.org/favicon.ico" type="image/x-icon" />

<title>网页设计师:怎样过渡</title>

<!-- 调用样式表 -->

<link rel="stylesheet" href="http://www.w3cn.org/style/001/001.css" 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用于描述表单内容。

<form>

<fildset>

<legend>title</legend>

<ol>

<li><label for="user-name">用户名</label>

<input type="text" name="uname" id="uname"/></li>

<li><label for="user-password">密码</label>

<input type="password" name="password" id="user-password" /></li>

<ol>

</fildset>

</form>

dl,dt,dd:当页面中出现第一行为类似标题/简述,然后下面为详细描述的内容时应该使用该标签

<dl>

<dt></dt>

<dd></dd>

<dt></dt>

<dd></dd>

</dl>

ul,li无序列表

<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>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有