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

  1. OLaneevige表示:

    Hi there to every single one, it’s truly a good for me to pay a visit this web page, it consists of useful Information.

    newsbizlife.ru/page/5В 
    tritattoo.com/tattoo-ideas/unique-matching-tattoos-for-couples/В 
    visacart.80lvl.ru/viewtopic.php?f=1&t=665&start=0&view=printВ 
    jurisprudenta.org/Standard.aspxВ 
    myworldavto.ru/page/8В 

  2. This really is a outstanding write-up. Thanks for taking a few minutes to describe all of this out for folks. It truly is a great guide!

  3. Vsmjxw表示:

    buy zovirax creams – desogestrel 0.075mg price dydrogesterone ca

  4. fix central表示:

    I would really love to guest post on your blog.`-,~’

  5. Greetings! Very useful advice within this article! It is the little changes that make the most significant changes. Thanks for sharing!

  6. Rcjedw表示:

    buy bactrim 480mg online – bactrim 480mg tablet tobrex sale

  7. ac tune up表示:

    This constantly amazes me exactly how blog owners for example yourself can find the time and also the commitment to keep on composing fantastic blog posts. Your site isexcellent and one of my own ought to read blogs. I simply want to thank you.

  8. Отличный сайт! Всем рекомендую!Ремонт холодильников на дому

  9. Eu recomendo o melhor cassino Blaze

  10. Youre so cool! I dont suppose Ive read anything this way prior to. So nice to uncover somebody with many original applying for grants this subject. realy we appreciate you starting this up. this website can be something that is needed online, someone if we do originality. valuable job for bringing new stuff on the internet!

  11. The majority of us don’t know how to start. Making it basic, you might be capability to ask all people nearest thing to you personally is most likely the best method to look for these types of condos in simply the subject associated with time and place.

  12. Nice post. I learn something tougher on different blogs everyday. It will always be stimulating to study content off their writers and exercise a specific thing from their store. I’d would prefer to use some with all the content in my blog regardless of whether you don’t mind. Natually I’ll provide a link for your web weblog. Thank you for sharing.

  13. Hi, actually love the style of your web site. Would you mind telling me what theme you happen to be utilizing? I’m new to this and I’m hoping to get mine looking anywhere near as cool as yours. Thanks a great deal.

  14. Отличный сайт! Всем рекомендую!Ремонт холодильников

  15. Great information, better still to find out your blog that has a great layout. Nicely done

  16. Woah! I’m really digging the template/theme of this site. It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between superb usability and appearance. I must say you have done a superb job with this. In addition, the blog loads very quick for me on Chrome. Exceptional Blog!

  17. Hi there! Do you know if they make any plugins to help with
    Search Engine Optimization? I’m trying to get my blog to
    rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Thanks!
    You can read similar text here: Choose your escape room

  18. O lugar perfeito para jogar jogos de cassino Blaze

  19. Seu cassino online favorito Blaze

  20. StephenDeery表示:

    Hi i am kavin, its my first time to commenting anywhere, when i read this post i thought i could also create comment due to this brilliant post.

    triumph-flowers.ru/bukety-nevesty/yarkij-buket-nevesty/В 
    amisite.ru/phpBB2/memberlist.php?mode=joined&order=ASC&start=6850В 
    http://www.rolandus.org/forum/profile.php?mode=viewprofile&u=25280В 
    sciencenewhop.maxbb.ru/topic543.html?view=previousВ 
    zelao41.ru/a-korolev-vzorvus-a-zhivym-ne-damsya/В 

  21. Eu recomendo o cassino mais popular Blaze

  22. Jogue com prazer neste cassino Blaze

  23. I really like your writing style, good info, thanks for putting up .

  24. I would like to show my thanks to you just for bailing me out of this problem. Right after researching through the world wide web and seeing strategies which are not helpful, I figured my entire life was gone. Existing minus the approaches to the issues you’ve fixed through your main guideline is a crucial case, and ones that would have in a negative way damaged my entire career if I hadn’t discovered your website. Your primary ability and kindness in playing with all things was precious. I am not sure what I would have done if I hadn’t come across such a solution like this. I’m able to at this moment look forward to my future. Thanks for your time very much for this impressive and result oriented guide. I won’t be reluctant to refer the sites to any person who should receive direction on this problem.

  25. all of my kids enjoy the park and rides in Disney World, disney really knows how to please kids`

  26. Dear Katie, I am sorry to hear that your doctor made a mistake and put you on Depo injections. You say that you are still getting injections? These injections are made from progestin, a synthetic form of progesterone which is used mainly as a method of birth control for women who cannot use any other form of birth control. One of the drug’s side effects is weight gain. A single injection lasts for three months. So if you are still getting these injections, please, please, tell your doctor that you don’t want to receive them any longer. The effects of the drug will remain in your body for three months, so during these three months, it may be difficult to lose the added weight which you gained, no matter what you do. There are other more gentler ways to regulate your periods and menses, especially at your tender formative age. Here are some of the negative reasons for not using Depo-Provera: it can cause decreased bone density which can lead to osteoporosis, depression, increased blood clots, liver damage, headaches, hair loss, leg cramps, nervousness, dizziness, abdominal bloating, and weight gain. For your stretch marks on your stomach, you can rub some vitamin E on them. Just puncture a capsule of vitamin E and gently apply to your stomach area once or twice each day. The stretch marks will respond to the vitamin E if you use it regularly and use it as soon as they appear. The older the stretch marks, the longer and more difficult they are to rub away. It is best to use natural vitamin E, which can be distinguished from the synthetic form by the following small print and notations on the vitamin bottle: d- is the natural form, and dl- is the synthetic form. Use only the d- form which is the natural form. I think that synthetic substances have caused enough harm already, and should be laid to rest. Find a doctor who will listen to you, have patience until the Depo drug gets out of your system and body, and continue follow a healthy diet and exercise regimen to get back to your former weight. Please read the posts above to learn more about dieting. Good luck.

  27. hullo, rv solar panels is the top-quality thing on earth. I have just bought a utilized solar panel kits, if You have currency You should do the same! adieu!

  28. HVAC表示:

    Oh my goodness! an excellent article dude. Thanks a lot Even so I’m experiencing problem with ur rss . Do not know why Struggle to register for it. Can there be any person finding identical rss issue? Anyone who knows kindly respond. Thnkx

發佈留言

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