HTML 4.01 快速導覽 - <title> 文件標題標籤

<title> 標籤 (tag) ,主要用途為提供 HTML 文件標題的資訊。



起始標籤結束標籤
需要需要


例如
<html>
<head>
<title>網頁標題</title>
</head>
<body>
<p>You ever have that feeling where you're not sure if
 you're awake or still dreaming?</p>
<p>A prison for your mind.</p>
<p>Free your mind.</p>
<p>Believe the unbelievable.</p>
<p>There is no spoon.</p>
<p>I can only show you the door, you have to walk 
through it.</p>
<p>Choice. The problem is choice.</p>
<p>Then tomorrow we may all be dead, but how would that 
be different from any other day?</p>
<p>I have dreamed a dream, but now that dream has gone 
from me.</p>
<p>Choice is an illusion, created between those with 
power, and those without.</p>
<p>Because I choose to.</p>
<p>Everything that has a beginning has an end.</p>
</body>
</html>

<!-- 《程式語言教學誌》的範例程式
     http://pydoing.blogspot.com/
     檔名:example01.html
     功能:示範 HTML 4.01 標記語言的使用 
     作者:張凱慶
     時間:西元 2011 年 5 月 -->


利用瀏覽器 (broswer) 開啟如下



注意到網頁的標題列



我們可以看到 <title></title> 圍起來的「網頁標題」出現在網頁的標題列。


<title> 的作用就是這麼簡單,當然,我們也可以用其他的文字當標題,例如
<html>
<head>
<title>The Matrix Quotes</title>
</head>
<body>
<p>You ever have that feeling where you're not sure if
 you're awake or still dreaming?</p>
<p>A prison for your mind.</p>
<p>Free your mind.</p>
<p>Believe the unbelievable.</p>
<p>There is no spoon.</p>
<p>I can only show you the door, you have to walk 
through it.</p>
<p>Choice. The problem is choice.</p>
<p>Then tomorrow we may all be dead, but how would that 
be different from any other day?</p>
<p>I have dreamed a dream, but now that dream has gone 
from me.</p>
<p>Choice is an illusion, created between those with 
power, and those without.</p>
<p>Because I choose to.</p>
<p>Everything that has a beginning has an end.</p>
</body>
</html>

<!-- 《程式語言教學誌》的範例程式
     http://pydoing.blogspot.com/
     檔名:example01.html
     功能:示範 HTML 4.01 標記語言的使用 
     作者:張凱慶
     時間:西元 2011 年 5 月 -->


瀏覽器開啟如下



這樣網頁標題就變成了
The Matrix Quotes


中英文術語對照
標籤tag
瀏覽器broswer


您可以繼續參考



相關目錄
HTML 4.01 快速導覽 - 目錄
HTML, CSS 教材
首頁


參考資料

沒有留言: