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新增

24,825 Responses

  1. CraigShece表示:

    Manchester United and Liverpool are two of the most successful football clubs in England, each with a rich history and a massive fanbase https://manchesterunitedvsliverpool.ru/.

  2. CraigShece表示:

    Explore the epic rivalry between Manchester United and Liverpool, two of the most storied clubs in English football https://manchesterunitedvsliverpool.ru/.

  3. Hip dysplasia is not uncommon in many dog breeds, particularly the larger breeds. It is a deformity of the of the hip joint so the bone and socket do not fit snug. It causes rubbing and degeneration of the bone, inflamation and damage to surounding cartalidge. The condition usually leads to arthritus as the bone is grinded down new mishapen bone grows back causing pain. The good news about Canine Hip Dysplasia is that most cases can be treated to help eliminate or decrease pain, allowing fairly normal levels of activity. Very few dogs today have to be put to sleep to alleviate suffering. There are always choices to be made, but the vast majority of affected animals can live quite comfortable lives. Depending on how severe the damege is pain medication and anti-inflammatory drugs can be given. Another very good supplement to give is glueclosamine. Eventually though surgery might be necessary. . . I would suggest talking to the shelter about having him examined by a vet of your choice before officially adopting him. If you are willing to spend a little money to consult with a vetranarian you’ll be able to discuss this guy’s prognosis. This way you can know beforehand if his case is mild or severe and what treatment options are reccommended and at what cost. I hope I haven’t scared you away from adopting this dog because it may only be arthritis misdiagnosed or a mild case of hip dysplasia, only a vet can tell you for sure.

  4. Herbertswove表示:

    can you buy prednisone online uk prednisone 475 or prednisone 2.5 mg https://www.google.sn/url?q=https://prednisonebestprice.pro 1250 mg prednisone how can i get prednisone prednisone price south africa and prednisone steroids buying prednisone from canada

  5. PeterElest表示:

    nolvadex during cycle nolvadex side effects or tamoxifen hip pain https://www.google.com.ng/url?q=https://nolvadexbestprice.pro natural alternatives to tamoxifen tamoxifen for sale tamoxifen and tamoxifen and antidepressants nolvadex online

  6. Sweet blog! I found it while browsing on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Thank you

  7. Aw, this was an exceptionally good post. Spending some time and actual effort to make a superb article… but what can I say… I hesitate a whole lot and never manage to get anything done.

  8. Keithmycle表示:

    Welcome to the World of Jessica von Bredow-Werndl https://jessicavonbredow-werndl.ru/.

  9. Keithmycle表示:

    Jessica von Bredow-Werndl is a prominent German dressage rider known for her exceptional skills and dedication to the sport. Born on April 24, 1986, in Germany, Jessica has become a leading figure in international dressage competitions https://jessicavonbredow-werndl.ru/.

  10. my dad is a massage therapist and he can really relieve minor pains and injuries*

  11. I really like your writing style, wonderful information, thanks for putting up : D.

  12. It takes discipline to cut your losses short, but its a must if you want to achieve exceptional stock market results.

  13. Charleszep表示:

    Мы — команда опытных дизайнеров и мастеров специализирующихся на создании кухонь под заказ https://kuhnyaofabrikaufabrik.ru/. variant4

  14. Philipciz表示:

    Epic Showdown. Follow the most thrilling football rivalry in the world https://elclasicoshowdown.ru/!

  15. Philipciz表示:

    A brief overview of the historical rivalry between Real Madrid and Barcelona https://elclasicoshowdown.ru/.

  16. Going long’ is more conventional than going short.

  17. botox can be very helpful with skin wrinkles and it can also help treat bruxism“

  18. Craigsniva表示:

    Магазин Экипировка Эксперт ГАРПИЯ 380W Боец Экипировка Эксперт — это розничный магазин сотрудничающий с рядом оптовых складов и производителей. Это значит что при должном количестве товара мы дадим очень хорошие цены. Название взяли независимо от того что наша страна сейчас проводит Специальную Военную Операцию хорошая снаряга и экипировка нужна всегда. Готовишься в бой мобилизован привык активно проводить время или решил подготовить тревожный чемоданчик мы поможем тебе. Наши клиенты: фонды медики такие же как ты бойцы СВО и обычные неравнодушные граждане. Самое главное что нужно о нас знать мы детально объясняем что и как работает чтобы ты сделал правильный выбор не переплачивая. Обращаясь к нам не удивляйся если ты получишь честный и жесткий ответ – часто случается так что мы знаем лучше что именно нужно нашему гостю. Особенно это касается мобилизованных без опыта боевых действий. Здесь ты можешь полагаться на нашу экспертность. Одна из наших основных целей предоставить тебе возможность удобной и безопасной покупки: хоть за наличку хоть по карте хоть по счету. Повторимся если нужна оптовая поставка согласуем и отгрузим. Именно от того как ты производишь оплату зависит цена заказа. Для нас важно предоставить тебе качественную экипировку и снаряжение соблюдая при этом законы нашей страны. Боец помни мы помогаем фондам нуждающимся людям подразделениям в зоне СВО. Отчеты об этом опубликованы как на сайте. На эту деятельность уходит значительная часть выручки. Делая покупки в нашем магазине ты помогаешь людям и фронту. Уверен что это найдет отзыв в твоем сердце. У нашей команды есть набор ценностей: честность справедливость сопереживание взаимопомощь мужество патриотичность. Уверены ты их разделяешь и мы легко найдем общий язык. Ну а если что-то пойдет не так не руби с плеча объясни где мы ошиблись и поверь мы разберемся и исправим. Наш девиз In hostem omnia licita – по отношению к врагу дозволено все. Возьми этот девиз он поможет тебе принять правильное решение в трудной ситуации с честью выполнить боевую задачу и вернуться домой живым и здоровым

  19. Found at a corner on Mohammed Ali Road, this location has two doors. When you get inside of and go up, there seem to be rooms following rooms just after rooms. It is all  perplexing, but just let the waiters guideline you. As soon as settled, consider some time to take a look at the menu. There are exceptional “Tawa-taka-tak” goods and “Raan” dishes. You can get a crack at paya soup, seekh kebabs, chicken tandoori and chicken afghani. Seekh kebabs are superior. The tandoori rotis are exceptional. They also have destinations where they serve other things like snacks, faloodas, kulfis etc.

  20. I am just use very happy understand this. This can be the method of information which needs to be presented harmful . ” the actual random hype may possibly be inside the another webpages. Satisfaction from your individual sharing with us the following prime file.

  21. RobertHaumn表示:

    does tamoxifen cause menopause: tamoxifen breast cancer – tamoxifen alternatives premenopausal

  22. Michaeldib表示:

    The Pitons: These iconic volcanic spires are a UNESCO World Heritage Site and a symbol of Saint Lucia. They offer stunning views and hiking opportunities https://discoversaintlucia.ru/.

  23. I know of the fact that today, more and more people are attracted to surveillance cameras and the field of pictures. However, to be a photographer, you must first invest so much period deciding which model of photographic camera to buy and moving from store to store just so you may buy the most affordable camera of the brand you have decided to decide on. But it does not end just there. You also have to think about whether you should obtain a digital dslr camera extended warranty. Thanks for the good suggestions I accumulated from your blog site.

  24. Woah… – Gulvafslibning | Kurt Gulvmand I’m genuinely digging your design:style for the blog. It is very simple, though great. A lot of times it’s tough to obtain that balance between usability as well as appearance. I actually should mention that you’ve done a very good site. Also, this weblog starts very quick to me with Opera. Outstanding Site – Gulvafslibning | Kurt Gulvmand Mmm what about Libya awesome news flash! Peace Flash Factory Web Design

  25. pokertube表示:

    Also visit my blog – pokertube

發佈留言

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