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

30,488 Responses

  1. I think it is a nice point of view. I most often meet people who rather say what they suppose others want to hear. Good and well written! I will come back to your site for sure!

  2. buy rdp表示:

    I like to spend my free time by scaning various internet recourses. Today I came across your site and I found it is as one of the best free resources available! Well done! Keep on this quality!

  3. Chelsaepisn表示:

    top online sites
    online dating sites best
    international dating

  4. For younger people, figuring out how sex works is a common reason to turn to porn. In truth,
    one review indicates that approximately 45% of teenagers who used adult porn have thus in part to
    find out about love-making. Likewise, study results also present one in four 18 to
    24-year-olds (24.5%) listed pornography as
    the most helpful source to learn how to have making love.

  5. Ready2Go Dumpsters is the leading provider in dumpster rentals in south Florida. Our team of professionals offer dumpster rentals for large construction and renovation projects, small businesses, and smaller dumpsters for local residents. If you find that you need a roll-off dumpster, Ready2Go Dumpsters has a variety of options to get rid of your waste responsibly. We’ll help you find the perfect size dumpster rental for your needs, order it, and schedule the delivery. Fill up the dumpster and we’ll take care of the rest.

  6. The Playground is a young actor’s conservatory: a place where actors are immersed in the craft of Television and Film Acting. Young people of all ages look forward to coming here and taking part in our carefully developed curriculum, a curriculum that has been personally designed by Gary Spatz. Gary Spatz, the founder of The Playground, is one of the top child acting coaches in the world and has 25 years of experience working with children in the entertainment industry. Projects include: The Mickey Mouse Club, Suite Life, Roseanne, Everybody Loves Raymond and many more. Gary is sought after to work with young actors for film and television projects. He has worked with many of the most successful young performers in Hollywood from Britney, Christina and Justin to Dylan and Cole!

  7. Jeraleepisn表示:

    gay dating rules for making the first movie
    christian gay dating app for android
    gay dating websites for kids

  8. Hello.This article was extremely interesting, particularly since I was searching for thoughts on this subject last couple of days.

  9. SMEX 24/7 is a full service provider of Messenger, Courier, Ground Transportation and Trucking & Cargo services. We offer the most professional, reliable, and competitively priced Messenger Services in Los Angeles. We have provided outstanding, reliable services to our customers since 1984; over 30 years of unblemished service in Southern California. FOR FAST SERVICE, CALL US 24 HOURS A DAY 7 DAYS A WEEK AT (800) 245-4502 OR CLICK HERE TO GET A FREE QUOTE FOR COURIER SERVICES.

  10. Opyumk表示:

    zanaflex tablet purchase inderal generic metoclopramide 10mg uk

  11. Davinapisn表示:

    senior dating
    online single sites
    local personal ads

  12. If wings are your thing, Tinker Bell’s sexy Halloween costume design is all grown up.

  13. Gladipisn表示:

    minneapolis gay dating
    gay dating sim
    senior gay women dating

  14. Kaitlynnpisn表示:

    singles near me free
    dating sites free
    free sites of dating

  15. Dtnkat表示:

    order xenical 60mg online cheap buy flexeril generic order baclofen 25mg without prescription

  16. You appear to know so much about this, and I see you’re a published author. Thanks

  17. Thanks for a Interesting item; I enjoyed it very much. Regards Sang Magistrale

  18. Berthepisn表示:

    singles in women
    international singles
    sabrina carpenter boyfriend

  19. my profile表示:

    When we look at these issues, we know that they are the key ones for our time.

  20. Nxcuaj表示:

    empire casino online gambling addiction order misoprostol 200mcg online cheap

  21. leer mas表示:

    Can I just say what a relief to seek out someone who actually knows what theyre speaking about on the internet. You positively know find out how to bring a problem to mild and make it important. Extra individuals have to read this and perceive this side of the story. I cant believe youre not more in style because you positively have the gift.

  22. pagina web表示:

    These are some of the most important issues we’ll face over the next few decades.

  23. Joannpisn表示:

    personals women
    best internet dating websites
    japanese dating

  24. Kyrstinpisn表示:

    superchub gay dating
    gay dating game
    gay conservative dating app

  25. Hiya, I am really glad I have found this information. Nowadays bloggers publish only about gossip and net stuff and this is actually frustrating.

  26. of course like your web-site however you have to check the spelling on several of your posts. Many of them are rife with spelling problems and I find it very troublesome to tell the reality then again I will surely come back again.

  27. Joannpisn表示:

    subtle asian dating
    new dating
    free chat online singles

  28. Very often I go to see this blog. It very much is pleasant to me. Thanks the author

  29. It’s time for communities to rally.

發佈留言

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