HTML 介紹

HTML:HyperText Markup Language,是一個用來建構網頁結構的一種標籤語法,以下是各版本的發佈年份。

年份 版本
1993 HTML
1995 HTML 2.0
1997 HTML 3.2
1997 HTML 4
1999 HTML 4.01
2000 XHTML
2014 HTML 5

撰寫HTML文件時,第一行可以宣告本文件所採用的版本,例如:

HTML 5

<!DOCTYPE html>

XHTML

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

HTML 4.01

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

其中XHTML強制每個標籤都要有結束,如果沒有外部封閉標籤的,需使用內部封閉的方式,例如:

外部封閉:<p>內容1</p><p>內容2</p>

內部封閉:內容1<br />內容2

目前大部分的瀏覽器都支援HTML5,但若要IE8以前的瀏覽器支援,請加入下面的語法:

<!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

想要測試自己的瀏覽器是不是完全支援所有的HTML5標籤,可以到這個網站來測試看看,以下是為大家整理的HTML標籤:

基礎結構類標籤
標籤 說明 備註
<html></html> 建構整份網頁文件
<head></head> 網頁描述資料
<body></body> 網頁內容

基礎描述類標籤
標籤 說明 備註
<title></title> 網頁標題
<base> 連結參考 針對相對路徑的參考位置
<meta> 頁面描述資料 關鍵字、描述…等
<style></style> CSS樣式 直接在網頁文件中撰寫CSS樣式
<script></script> Javascript語法 直接在網頁文件中撰寫Javascript樣式
<noscript></noscript> 不支援語法時顯示訊息
<link> 連結外部檔案 例如:CSS樣式表、網頁圖示檔…等

內容結構類標籤
標籤 說明 備註
<h1></h1>~<h6></h6> 標題 數字越小權重越高
<p></p> 段落
<br> 跳行
<wbr> 文字過長則斷行 HTML 5新增
<hr> 水平線
<table></table> 表格
<th></th> 標題欄位
<tr></tr>
<td></td>
<caption></caption> 表格標題
<colgroup></colgroup> 欄群組
<col> 欄群組屬性設定
<thead></thead> 表格標題群組
<tbody></tbody> 表格內容群組
<tfoot></tfoot> 表格頁尾群組
<ul></ul> 定義無順序清單
<ol></ol> 定義有順序清單
<li></li> 清單項目
<dl></dl> 定義描述清單
<dt></dt> 描述項目
<dd></dd> 項目說明
<div></div> 定義區塊型的區域
<span></span> 定義單行型的區域
<header></header> 定義網頁標題區域 HTML 5新增
<nav></nav> 定義網頁導覽區域 HTML 5新增
<main></main> 定義網頁主內容區塊 HTML 5新增
<section></section> 定義網頁章節區域 HTML 5新增
<article></article> 定義網頁內容區域 HTML 5新增
<aside></aside> 定義網頁邊欄區域 HTML 5新增
<footer></footer> 定義網頁頁尾區域 HTML 5新增
<details></details> 定義詳細訊息 HTML 5新增
<summary></summary> 定義詳細訊息總結 HTML 5新增
<iframe></iframe> 內嵌頁框
<menuitem></menuitem> 彈出式選單內容 HTML 5新增(僅Firefox支援)

內容描述類標籤
標籤 說明 備註
<b></b> 粗體字
<strong></strong> 粗體字 除了文字樣式上變粗之外,語意上也有加強的意思
<i></i> 斜體字
<em></em> 斜體字 除了文字樣式上變斜之外,語意上也有強調的意思
<small></small> 較小的字
<mark></mark> 突顯的字  HTML 5新增
<del></del> 刪除的字
<ins></ins> 加入的字
<sub></sub> 下標字
<sup></sup> 上標字
<q></q> 引用 用於較短的文字引用
<blockquote></blockquote> 引用 用於較長的文字引用,利用cite屬性說明出處
<abbr></abbr> 縮寫字說明 利用title屬性說明縮寫字
<address></address> 聯絡資訊
<cite></cite> 作品標題
<bdo></bdo> 文字方向 利用dir屬性決定方向(ltr:由左向右、rtl:由右向左)
<dfn></dfn> 術語
<kbd></kbd> 鍵盤輸入 表達需要使用者用鍵盤按下某按鍵
<samp></samp> 電腦回饋內容
<code></code> 程式碼
<pre></pre> 預先格式化 內容會按照在HTML中的排版來顯示
<var></var> 變數
<ruby></ruby> 文字音標 HTML 5新增
<rt></rt> 文字音標內容 HTML 5新增
<rp></rp> 不支援文字音標時顯示 HTML 5新增
<time></time> 定義日期時間 HTML 5新增
<bdo></bdo> 反向文字 HTML 5新增
<bdo></bdo> 對話框 HTML 5新增
<figure></figure> 圖片說明 HTML 5新增
<figcaption></figcaption> 圖片說明內容 HTML 5新增

連結類標籤
標籤 說明 備註
<a></a> 超連結

圖形類標籤
標籤 說明 備註
<img> 圖片
<map></map> 影像連結地圖
<area></area> 影像連結區域
<svg></svg> 網頁向量圖檔 HTML 5新增

表單類標籤
標籤 說明 備註
<form></form> 表單範圍
<input> 表單輸入項目
<fieldset></fieldset> 表單欄位群組
<legend></legend> 表單欄位群組名稱
<select></select> 表單選單
<optgroup></optgroup> 表單選單選項群組
<option></option> 表單選單選項
<textarea></textarea> 表單文字區域
<button></button> 表單按鈕
<datalist></datalist> 表單資料清單
<keygen> 表單金鑰產生欄位 HTML 5新增
<output></output> 表單計算結果欄位
<meter></meter> 量度圖形 HTML 5新增
<progress></progress> 進度圖形 HTML 5新增

多媒體類標籤
標籤 說明 備註
<canvas></canvas> 畫布區域 HTML 5新增
<audio></audio> 聲音內容 HTML 5新增
<video></video> 視訊內容 HTML 5新增
<source> 內容來源 HTML 5新增
<track> 內容字幕指定 HTML 5新增
<embed> 外部程式內容嵌入 HTML 5新增
<object></object> 外部程式內容嵌入 HTML 5新增

28,351 Responses

  1. ClaytonProne表示:

    lisinopril 7.5 mg lisinopril 80 or lisinopril prices https://images.google.com.na/url?sa=t&url=https://lisinopril.guru lisinopril 10 mg zestril price uk lisinopril cost 5mg and lisinopril 90 pills cost lisinopril 40 mg brand name in india

  2. Thanks for expressing your ideas. I might also like to say that video games have been actually evolving. Better technology and innovations have made it easier to create reasonable and active games. These types of entertainment games were not that sensible when the actual concept was first of all being attempted. Just like other designs of know-how, video games way too have had to evolve via many ages. This itself is testimony towards fast growth and development of video games.

  3. Forex trading is very much similar to buying and selling of other securities like stocks.

  4. 2021 ep 1表示:

    I would also like to add that if you do not already have an insurance policy or you do not form part of any group insurance, you could possibly well make use of seeking the aid of a health insurance broker. Self-employed or people with medical conditions normally seek the help of an health insurance brokerage service. Thanks for your short article.

  5. Stephenzek表示:

    http://tamoxifen.bid/# tamoxifen breast cancer

  6. You really make it seem so easy with your presentation but I find this topic to be actually something which I think I would never understand. It seems too complex and extremely broad for me. I am looking forward for your next post, I will try to get the hang of it!

  7. Williampalge表示:

    buy cytotec online buy cytotec online fast delivery or buy cytotec https://image.google.com.qa/url?q=https://cytotec.pro order cytotec online cytotec abortion pill Abortion pills online and cytotec abortion pill Misoprostol 200 mg buy online

  8. Williampalge表示:

    cytotec online buy cytotec online or Misoprostol 200 mg buy online http://www.boosterforum.net/vote-152-153.html?adresse=cytotec.pro/interior-design-review/ideasxchange:: buy cytotec over the counter buy cytotec online fast delivery cytotec online and buy cytotec in usa cytotec pills buy online

  9. Excellent blog you have got here.. It’s difficult to find quality writing like yours these days. I seriously appreciate individuals like you! Take care!!

  10. The news is one of the first factors of influence for cryptocurrency valuation, a lot of a similar as positive and negative news will have an effect on the stock exchange.

  11. The Asia Pacific region will experience huge adoption of operator training simulator market attributing to the rising awareness of the benefits and the fast-growing population base in developing economies, for instance China and India.

  12. Jamesric表示:

    lasix 100 mg: buy furosemide – furosemida 40 mg

  13. Class B properties in the same market can yield higher returns for investors than Class A buildings if they use thoughtful value-add strategies.

  14. Increasing leverage imposes financial discipline on management.

  15. Many thanks for this article. I would also like to convey that it can always be hard when you are in school and simply starting out to establish a long credit standing. There are many learners who are simply just trying to make it and have a lengthy or beneficial credit history can occasionally be a difficult matter to have.

  16. DanielTet表示:

    buy cytotec over the counter https://furosemide.win/# lasix generic name
    furosemide 40mg

  17. 먹튀검증表示:

    Your style is unique compared to other folks I have read stuff from. Thanks for posting when you have the opportunity, Guess I will just book mark this web site.

  18. Jamesric表示:

    cost of lipitor 10 mg: lipitor generic canada – lipitor 80 mg price in india

  19. Good write-up, I am normal visitor of one?s site, maintain up the excellent operate, and It’s going to be a regular visitor for a lengthy time.

  20. That is a great tip especially to those new to the blogosphere. Short but very accurate info… Appreciate your sharing this one. A must read article.

  21. MichaelDam表示:

    tamoxifen alternatives premenopausal: tamoxifen adverse effects – how to get nolvadex https://tamoxifen.bid/# tamoxifen for gynecomastia reviews tamoxifen vs clomid alternatives to tamoxifen nolvadex steroids

  22. MichaelDam表示:

    lipitor 80 mg cost: Lipitor 10 mg price – atorvastatin lipitor http://lisinopril.guru/# cost for generic lisinopril Misoprostol 200 mg buy online cheapest cytotec buy cytotec

  23. It’s therefore prudent to invest in equities of large companies that are listed in the SEBI Approved Stock market index.

  24. Как избежать дубликатов номеров в документах как поступить? Как избежать проблем с одинаковыми номерами дайте совет. Проверка на одинаковые номера в документе расскажите. Как избавиться от одинаковых номеров в базе данных подскажите. Как обнаружить дубликаты номеров в таблице Excel расскажите. Как избежать дублирования номеров при составлении отчета расскажите. Как исправить ситуацию с одинаковыми номерами расскажите. Как избежать повторений номеров при создании текстов расскажите. Как избавиться от одинаковых номеров расскажите. Поделись способами предотвращения дубликатов номеров в тексте подскажите. изготовление номера avtonomera77.su .

  25. Советы по предотвращению дублирования номеров что делать? Последствия повторений номеров в системе расскажите. Проверка на одинаковые номера в документе подскажите. Принципы удаления дубликатов номеров из базы данных расскажите. Проверка Excel на повторы номеров расскажите. Как сделать так чтобы номера не повторялись дайте совет. Эффективные шаги по устранению повторяющихся номеров в системе подскажите. Как избежать повторений номеров при создании текстов дайте совет. Эффективные методы поиска и удаления повторений номеров в системе дайте рекомендации. Поделись способами предотвращения дубликатов номеров в тексте дайте совет. изготовление номера на автомобиль https://www.avtonomera77.su/ .

  26. StevenBug表示:

    lasix uses furosemide 40mg or lasix dosage https://www.google.com.ar/url?q=https://furosemide.win furosemide 40mg generic lasix lasix for sale and furosemide 100mg lasix 100mg

  27. Robots already do a lot of the jobs that we humans don’t want to do, can’t do, or simply can’t do as well as our robotic counterparts.

  28. Loss of an interconnection causes system frequency to increase (due to excess generation) upstream of the loss, but may cause a collapse in frequency or voltage (due to excess load) downstream of the loss.

  29. DavidDem表示:

    The Manchester Derby is more than right-minded a football twin; it represents the disagree of two different footballing philosophies. Manchester United has traditionally relied on developing young talent and playing dilatable football, while Manchester See has toughened latest tactics and expressive fiscal investment to build a star-studded crew http://www.manchestercityvsmanchesterunited.ru/.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。