將前面的分析整合起來,完整程式碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>Google</title>
<style type="text/css">
body{
background:#FFF;
color:#000;
font-family:Arial,sans-serif;
font-size:13px;
text-align:center;
margin-top:3px;
}
a:link{
color:#00C;
}
a:visited{
color:#551a8b;
}
#login{
text-align:right;
}
#stype{
margin-bottom:4px;
}
#stype span{
padding:0 6px;
}
#search{
margin:0 auto;
width:400px;
position:relative;
}
#more{
width:4em;
position:absolute;
top:0;
right:-4.5em;
}
#ft{
margin:54px auto 16px;
}
</style>
</head>
<body>
<div style="text-align:right"><a href="ig">個性化主頁</a>|<a href="MyAccount">
我的帳戶</a>|<a href="logout">退出</a></div>
<div style="margin:4px auto 19px;">
<img src="logo.gif" alt="Google"/></div>
<div id="stype"><span><strong>網頁</strong></span><span><a href="pic">圖片</a>
</span><span><a href="info">資訊</a></span><span><a href="group">論壇</a></span><span>
<a href="more"><strong>更多»</strong></a></span></div>
<form id="search" action="" method="post">
<div><input type="text" size="55" title="Google 搜尋"/></div>
<div><button type="submit">Google 搜尋</button><button>手氣不錯</button></div>
<div style="margin-top:6px;"><label><input type="radio" name="t" checked="checked"/>
搜尋所有網頁</label><label><input type="radio" name="t"/>中文網頁</label><label>
<input type="radio" name="t"/>簡體中文網頁</label></div>
<div id="more"><a href="advanced_search">高級搜尋</a>
<a href="pref">使用偏好</a><a href="lang">語言工具</a></div>
</form>
<div id="ft"><a href="ad">廣告計劃</a>-<a href="all">
Google 大全</a>-<a href="en">Google.com in English</a></div>
<div>©2007 Google</div>
</body>
</html>
【編輯推薦】
【責任編輯:程華權 TEL:(010)68476606】