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,539 Responses

  1. Отличный сайт! Всем рекомендую!слив курсов.net

  2. JamesNut表示:

    sildenafil citrate: pharmacy warfarin counselling – Prothiaden http://pharmbig24.com/# pharmacy store viagra cialis spam

  3. BryantHap表示:

    mexican rx online mexico drug stores pharmacies or medication from mexico pharmacy http://www.google.bt/url?q=https://mexicopharmacy.cheap mexico drug stores pharmacies mexican drugstore online mexican online pharmacies prescription drugs and mexican drugstore online mexico drug stores pharmacies

  4. сайт комета casino kometa win

  5. kometa casino topcasino4 one

  6. RobertMef表示:

    india pharmacy: best india pharmacy – online pharmacy india

  7. eskortobliz表示:

    ххх эскорт услуги

  8. eskortobliz表示:

    эскорт услуги ростов

  9. RobertMef表示:

    buying from online mexican pharmacy: pharmacies in mexico that ship to usa – mexico pharmacies prescription drugs

  10. Alfonsofougs表示:

    Medical staff on the front line of the battle against mpox in eastern Democratic Republic of Congo have told the BBC they are desperate for vaccines to arrive so they can stem the rate of new infections. blacksprut2rprrt3aoigwh7zftiprzqyqynzz2eiimmwmykw7wkpyad.onion At a treatment centre in South Kivu province that the BBC visited in the epicentre of the outbreak they say more patients are arriving every day – especially babies – and there is a shortage of essential equipment. blacksprut com https://bs2gl.net Mpox – formerly known as monkeypox – is a highly contagious disease and has killed at least 635 people in DR Congo this year. Even though 200000 vaccines donated by the European Commission were flown into the capital Kinshasa last week they are yet to be transported across this vast country – and it could be several weeks before they reach South Kivu. “Weve learned from social media that the vaccine is already available” Emmanuel Fikiri a nurse working at the clinic that has been turned into a specialist centre to tackle the virus told the BBC. He said this was the first time he had treated patients with mpox and every day he feared catching it and passing it on to his own children – aged seven five and one. “You saw how I touched the patients because thats my job as a nurse. So were asking the government to help us by first giving us the vaccines.” The reason it will take time to transport the vaccines is that they need to be stored at a precise temperature – below freezing – to maintain their potency plus they need to be sent to rural areas of South Kivu like Kamituga Kavumu and Lwiro where the outbreak is rife. The lack of infrastructure and bad roads mean that helicopters could possibly be used to drop some of the vaccines which will further drive up costs in a country that is already struggling financially. At the community clinic Dr Pacifique Karanzo appeared fatigued and downbeat having been rushed off his feet all morning. Although he wore a face shield I could see the sweat running down his face. He said he was saddened to see patients sharing beds. “You will even see that the patients are sleeping on the floor” he told me clearly exasperated. “The only support we have already had is a little medicine for the patients and water. As far as other challenges are concerned theres still no staff motivation.” блэк СЃРїСЂСѓС‚

  11. RickeyjeAro表示:

    Medical staff on the front line of the battle against mpox in eastern Democratic Republic of Congo have told the BBC they are desperate for vaccines to arrive so they can stem the rate of new infections. btrhbfeojofxcpxuwnsp5h7h22htohw4btqegnxatocbkgdlfiawhyid.onion At a treatment centre in South Kivu province that the BBC visited in the epicentre of the outbreak they say more patients are arriving every day – especially babies – and there is a shortage of essential equipment. блэк СЃРїСЂСѓС‚ https://clearbs2tor2.tech Mpox – formerly known as monkeypox – is a highly contagious disease and has killed at least 635 people in DR Congo this year. Even though 200000 vaccines donated by the European Commission were flown into the capital Kinshasa last week they are yet to be transported across this vast country – and it could be several weeks before they reach South Kivu. “Weve learned from social media that the vaccine is already available” Emmanuel Fikiri a nurse working at the clinic that has been turned into a specialist centre to tackle the virus told the BBC. He said this was the first time he had treated patients with mpox and every day he feared catching it and passing it on to his own children – aged seven five and one. “You saw how I touched the patients because thats my job as a nurse. So were asking the government to help us by first giving us the vaccines.” The reason it will take time to transport the vaccines is that they need to be stored at a precise temperature – below freezing – to maintain their potency plus they need to be sent to rural areas of South Kivu like Kamituga Kavumu and Lwiro where the outbreak is rife. The lack of infrastructure and bad roads mean that helicopters could possibly be used to drop some of the vaccines which will further drive up costs in a country that is already struggling financially. At the community clinic Dr Pacifique Karanzo appeared fatigued and downbeat having been rushed off his feet all morning. Although he wore a face shield I could see the sweat running down his face. He said he was saddened to see patients sharing beds. “You will even see that the patients are sleeping on the floor” he told me clearly exasperated. “The only support we have already had is a little medicine for the patients and water. As far as other challenges are concerned theres still no staff motivation.” блэкспрут

  12. JamesNut表示:

    reputable indian online pharmacy: Online medicine order – Online medicine order http://mexicopharmacy.cheap/# medicine in mexico pharmacies

  13. MauriceGueda表示:

    purple pharmacy mexico price list: mexico drug stores pharmacies – pharmacies in mexico that ship to usa

  14. Marlonpax表示:

    Medical staff on the front line of the battle against mpox in eastern Democratic Republic of Congo have told the BBC they are desperate for vaccines to arrive so they can stem the rate of new infections. blacksprut площадка At a treatment centre in South Kivu province that the BBC visited in the epicentre of the outbreak they say more patients are arriving every day – especially babies – and there is a shortage of essential equipment. блэк СЃРїСЂСѓС‚ onion https://b2webin.com Mpox – formerly known as monkeypox – is a highly contagious disease and has killed at least 635 people in DR Congo this year. Even though 200000 vaccines donated by the European Commission were flown into the capital Kinshasa last week they are yet to be transported across this vast country – and it could be several weeks before they reach South Kivu. “Weve learned from social media that the vaccine is already available” Emmanuel Fikiri a nurse working at the clinic that has been turned into a specialist centre to tackle the virus told the BBC. He said this was the first time he had treated patients with mpox and every day he feared catching it and passing it on to his own children – aged seven five and one. “You saw how I touched the patients because thats my job as a nurse. So were asking the government to help us by first giving us the vaccines.” The reason it will take time to transport the vaccines is that they need to be stored at a precise temperature – below freezing – to maintain their potency plus they need to be sent to rural areas of South Kivu like Kamituga Kavumu and Lwiro where the outbreak is rife. The lack of infrastructure and bad roads mean that helicopters could possibly be used to drop some of the vaccines which will further drive up costs in a country that is already struggling financially. At the community clinic Dr Pacifique Karanzo appeared fatigued and downbeat having been rushed off his feet all morning. Although he wore a face shield I could see the sweat running down his face. He said he was saddened to see patients sharing beds. “You will even see that the patients are sleeping on the floor” he told me clearly exasperated. “The only support we have already had is a little medicine for the patients and water. As far as other challenges are concerned theres still no staff motivation.” блэкспрут

  15. Josephfub表示:

    adipex mexico pharmacy pharmacy cialis prices legitimate online pharmacy

  16. зиговочная машина зиговочная машина .

  17. This actually answered my drawback, thanks!

  18. Избегайте ошибок с номерами: советы и рекомендации лучшие практики для упрощения номеров почему важно избегать дублирование номеров на важных документах экспертные советы по избежанию на документах как избежать по предотвращению дубликатов номеров на официальных документах эффективные способы предотвращения совпадения номеров на документах устранение дубликатов номеров: лучшие советы эффективные способы предотвращения дубликатов номеров на документах как избежать на официальной документации. дубликаты государственных номеров https://avtonomera77.su/ .

  19. MauriceGueda表示:

    india online pharmacy: п»їlegitimate online pharmacies india – online pharmacy india

  20. stiri interesante si utile postate pe blogul dumneavoastra. dar ca si o paranteza , ce parere aveti de cazarea la particulari ?.

  21. Josephfub表示:

    online pharmacy india indian pharmacy india online pharmacy

  22. It’s great site, I was looking for something like this

  23. ArthurKib表示:

    http://pharmbig24.com/# flovent hfa online pharmacy

  24. Hello, Neat post. There is an issue along with your site in web explorer, could test this¡K IE still is the marketplace leader and a huge portion of other people will miss your magnificent writing because of this problem.

  25. RobertMag表示:

    indian pharmacy paypal indian pharmacies safe or best online pharmacy india https://www.google.com.ai/url?q=https://indianpharmacy.company buy medicines online in india top 10 pharmacies in india top online pharmacy india and indian pharmacies safe п»їlegitimate online pharmacies india

  26. BryantHap表示:

    purple pharmacy mexico price list mexican online pharmacies prescription drugs or mexican mail order pharmacies https://www.keepandshare.com/business/tell_keepandshare_support_reportcontent.php?url=http://mexicopharmacy.cheap mexican drugstore online mexico drug stores pharmacies mexico drug stores pharmacies and buying prescription drugs in mexico medicine in mexico pharmacies

  27. ArthurKib表示:

    https://indianpharmacy.company/# indian pharmacies safe

  28. Davidhek表示:

    cialis united pharmacy pharmacy generic viagra or tretinoin cream pharmacy http://www.google.com.bn/url?sa=t&url=https://pharmbig24.com tescos pharmacy viagra viagra pharmacy us tacrolimus online pharmacy and Maxalt solutions rx pharmacy

  29. JamesNut表示:

    mexican pharmacy azithromycin: Suprax – target pharmacy augmentin https://indianpharmacy.company/# india pharmacy

  30. RobertMef表示:

    buying from online mexican pharmacy: mexican drugstore online – mexican pharmaceuticals online

發佈留言

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