![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||
|
在前兩章介紹網頁的基本架構後,開始可以來試做網頁了。首先在網頁<head>~</head>標籤內設定一些網頁基本附加(Meta)資訊。有了這些資訊瀏覽者才能找到並且正確顯示你的網頁。
主要的附加資訊有以下幾種,在<meta />空標籤內設定。
<meta name="keyword" content="HTML,CSS,Javascript" /><meta name="description" content="在這裡輸入網頁內容的概要..." /><meta http-equiv="Content-Language" content="zh-tw" /><meta http-equiv="Content-Type" content="text/html" charset="utf-8" /><meta http-equiv="Content-Style-Type" content="text/css" /><meta http-equiv="Content-Script-Type" content="text/javascript" />上一章有提到將文稿程式和樣式設定存放在外部的檔案,會讓HTML的構造文顯得簡潔易懂,不僅開發和維護容易,處理速度也會較快。連結外部的檔案也是在網頁<head>~</head>標籤內設定。設定的方式如下:
<link rel="stylesheet" type="text/css" href="../stylesheets/sample.css" /><script type="text/javascript" language="javascript" src="../script/sample.js"></script/>上述在網頁標頭(head)的資訊不會呈現在網頁上,因此時常被忽略。筆者通常會製作網頁樣版(template),每個網頁都套用上去,可以節省相當多的網頁開發工時,也可以避免設定錯誤。網頁樣版(template)內的網頁標身(<body>~</body>)內,還會放入接下來要說明的網頁版面配置。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>在這裡輸入網頁標題</title>
<meta name="keyword" content="在這裡輸入網頁關鍵語並以逗號做區隔 />
<meta name="description" content="在這裡輸入網頁內容的概要..." />
<meta http-equiv="Content-Language" content="zh-tw" />
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" type="text/css" href="../stylesheets/temp.css" />
<script type="text/javascript" language="javascript" src="../script/temp.js"></script/>
</head>
<body>
<div class = "body_head" ></div>
<div class = "body_left" ></div>
<div class = "body_middle" ></div>
<div class = "body_right" ></div>
<div class = "body_foot" ></div>
</body>
</html>
|
|
|
| 如何提出RFP找到適合的系統廠商(一) | |
| 解決Flash CS4動態檔案超連結的問題 | |
| 超簡單SEO對策-SiteMap的製作(一) | |
| 網頁製作入門(三) | |
| 製作業務流程的重要性(一) | |
| 性能測試(一) | |
| 網頁製作入門(一) | |
| 網頁製作入門(二) | |
| 如何發揮專案戰情室的功能 | |
| 超簡單SEO對策-SiteMap的製作(二) |