起始標籤 | 結束標籤 |
---|---|
需要 | 需要 |
<h?> 有幾個屬性
屬性 | 值 | Deprecated or Obsolete |
---|---|---|
align | left center right justify | Deprecated in HTML 4.01, Obsolete in HTML 5 |
這六種都是成對標籤 (tag) ,會使圍住的內容已相對應的標題顯示,舉例如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | < html > < head > < title >網頁標題</ title > </ head > < body > < h1 >Free your mind.</ h1 > < h2 >Free your mind.</ h2 > < h3 >Free your mind.</ h3 > < h4 >Free your mind.</ h4 > < h5 >Free your mind.</ h5 > < h6 >Free your mind.</ h6 > </ body > </ html > <!-- 《程式語言教學誌》的範例程式 檔名:textexample01.html 功能:示範 HTML 4.01 標記語言的使用 作者:張凱慶 時間:西元 2011 年 5 月 --> |
利用瀏覽器 (broswer) 開啟,結果如下

另可用 align 屬性 (attribute) 控制對齊方式,不過這個屬性在 HTML 4.01 是不被建議的, HTML 5 已經 Obsolete ,也就是無建置。
舉例如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | < html > < head > < title >網頁標題</ title > </ head > < body > < h1 align = "center" >Free your mind.</ h1 > < h2 align = "right" >Free your mind.</ h2 > < h3 align = "left" >Free your mind.</ h3 > < h4 align = "center" >Free your mind.</ h4 > < h5 align = "right" >Free your mind.</ h5 > < h6 align = "left" >Free your mind.</ h6 > </ body > </ html > <!-- 《程式語言教學誌》的範例程式 檔名:textexample02.html 功能:示範 HTML 4.01 標記語言的使用 作者:張凱慶 時間:西元 2011 年 5 月 --> |
結果如下

中英文術語對照 | |
---|---|
區塊元素 | block element |
標籤 | tag |
瀏覽器 | broswer |
屬性 | attribute |
您可以繼續參考
文字標記與樣式
- <h?> - 標題
- <em> - 強調
- <strong> - 強調
- <dfn> - 定義
- <code> - 程式碼
- <samp> - 簡單文字
- <kbd> - 鍵盤符號
- <var> - 變數
- <cite> - 作品名稱
- <abbr> - 英文縮寫
- <acronym> - 頭字母縮寫詞 Obsolete
- <q> - 行內引用
- <sub> - 下標
- <sup> - 上標
- <ins> - 插入
- <del> - 刪除
- <tt> - 細小字型 Obsolete
- <i> - 斜體字型
- <b> - 粗體字型
- <big> - 放大字型 Obsolete
- <small> - 縮小字型
- <strike> - 刪除線 Obsolete
- <s> - 刪除線 Obsolete
- <u> - 底線 Obsolete
- <font> - 字型樣式 Obsolete
- <basefont /> - 預設字型樣式 Obsolete
- <span> - 行內元素
相關目錄
HTML 4.01 快速導覽 - 目錄
HTML, CSS 教材
首頁
參考資料
http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html
http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
https://developer.mozilla.org/en/HTML/Element/h1
https://developer.mozilla.org/en/HTML/Element/h2
https://developer.mozilla.org/en/HTML/Element/h3
https://developer.mozilla.org/en/HTML/Element/h4
https://developer.mozilla.org/en/HTML/Element/h5
https://developer.mozilla.org/en/HTML/Element/h6
http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
https://developer.mozilla.org/en/HTML/Element/h1
https://developer.mozilla.org/en/HTML/Element/h2
https://developer.mozilla.org/en/HTML/Element/h3
https://developer.mozilla.org/en/HTML/Element/h4
https://developer.mozilla.org/en/HTML/Element/h5
https://developer.mozilla.org/en/HTML/Element/h6
沒有留言:
張貼留言