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

  1. PercyToums表示:

    sweet bonanza oyna: sweet bonanza – sweet bonanza 100 tl https://sweetbonanza.network/# slot oyunlari sweet bonanza kazanma saatleri sweet bonanza indir sweet bonanza guncel

  2. umc news表示:

    I can tell that you put a lot of time and effort into crafting this blog post. It definitely paid off – it’s fantastic!

  3. For example if EURO is stronger than USD then less people will be interested in visiting Europe but if Euro weakens even by few points then more people will be interested in visiting Europe because even a small fall would mean they will receive more Euros for their USDs.

  4. Plus, unfortunate occurrences like a lost job or a house fire could put a serious crimp in your pay-as-you-go practice.

  5. KevinSounc表示:

    http://sweetbonanza.network/# pragmatic play sweet bonanza

  6. Whenever you change job you have the option of withdrawing the amount of transfer it to the new employers account.

  7. As folks usually tend to die as they get older, the mortality tables allow insurance coverage companies to calculate the risk and improve premiums with age accordingly.

  8. Hence, with a definite purpose, one can invest in mutual funds and can use the money well which is staying idle.

  9. In keeping with information from the NYSE, buying and selling volume grew by about 164 between 2005 and 2009 for which high-frequency trading may be accounted.

  10. Leonardanire表示:

    sweet bonanza giris: sweet bonanza free spin demo – sweet bonanza slot demo https://denemebonusuverensiteler.win/# deneme bonusu veren siteler

  11. Leonardanire表示:

    guncel sweet bonanza: guncel sweet bonanza – sweet bonanza indir https://slotsiteleri.bid/# deneme bonusu veren siteler

  12. ShannonPut表示:

    deneme bonusu bonus veren siteler or bonus veren siteler https://maps.google.mv/url?q=https://denemebonusuverensiteler.win deneme bonusu deneme bonusu veren siteler deneme bonusu and bonus veren siteler bahis siteleri

  13. Darrelherse表示:

    en iyi slot siteler: bonus veren casino slot siteleri – slot siteleri bonus veren

  14. Как избежать дубликатов номеров на документах эффективные способы избежать дубликатов номеров на бумагах лучшие методы избежания дублирования номеров. Как справиться с дубликатами номеров на рабочем месте эффективные способы борьбы с дубликатами номеров. Полезные рекомендации по предотвращению дубликатов номеров лучшие способы борьбы с дубликатами номеров. лучшие способы избежания дубликатов номеров профессиональные подходы к борьбе с дубликатами номеров. дубликаты государственных номеров avto-znaki.com .

  15. PercyToums表示:

    deneme bonusu veren siteler: bahis siteleri – deneme bonusu veren siteler https://sweetbonanza.network/# sweet bonanza bonus veren siteler deneme bonusu deneme bonusu

  16. I would like to express thanks to you just for bailing me out of this type of matter. As a result of researching through the world wide web and coming across ideas which are not helpful, I assumed my entire life was done. Being alive minus the approaches to the difficulties you have fixed as a result of your good blog post is a critical case, as well as the kind which could have in a negative way affected my entire career if I had not come across your web blog. Your actual ability and kindness in playing with the whole thing was very helpful. I am not sure what I would have done if I had not discovered such a thing like this. It’s possible to at this moment look forward to my future. Thank you very much for this high quality and result oriented help. I will not hesitate to propose your blog to anyone who will need assistance on this matter.

  17. ShannonPut表示:

    deneme bonusu deneme bonusu veren siteler or deneme bonusu http://vapingblips.com/proxy.php?link=https://denemebonusuverensiteler.win bahis siteleri deneme bonusu veren siteler deneme bonusu veren siteler and bahis siteleri deneme bonusu veren siteler

  18. Timothytef表示:

    sweet bonanza hilesi sweet bonanza demo or sweet bonanza nas?l oynan?r http://www.freewho.com/whois/?q=sweetbonanza.network sweet bonanza demo turkce sweet bonanza guncel sweet bonanza mostbet and sweet bonanza nas?l oynan?r pragmatic play sweet bonanza

  19. PercyToums表示:

    deneme bonusu: bonus veren siteler – bonus veren siteler https://slotsiteleri.bid/# oyun siteleri slot bonus veren slot siteleri yasal slot siteleri oyun siteleri slot

  20. Spot up with this write-up, I seriously feel this site needs considerably more consideration. I’ll oftimes be again you just read much more, thank you for that information.

  21. ShannonPut表示:

    deneme bonusu veren siteler bonus veren siteler or bonus veren siteler https://images.google.dk/url?sa=t&url=https://denemebonusuverensiteler.win deneme bonusu veren siteler deneme bonusu bonus veren siteler and deneme bonusu veren siteler deneme bonusu

  22. I have discovered that intelligent real estate agents almost everywhere are warming up to FSBO Promoting. They are acknowledging that it’s not just placing a sign post in the front property. It’s really regarding building associations with these vendors who at some time will become consumers. So, when you give your time and efforts to supporting these suppliers go it alone — the “Law involving Reciprocity” kicks in. Thanks for your blog post.

  23. Antonethuth表示:

    End of an era: The big change coming to European travel in November вебкам на работе смотреть In travel news this week: an accidental megadeal on first-class tickets the world’s best-connected airport and why now is a good time to plan a trip to Europe. Plus a bit of relief for those of you traveling this Labor Day weekend. Goodbye to EU passport stamps Paper mementoes of our travels from boarding cards to even passports themselves are fast moving into obsolescence. The inky smudgy joy of a fresh passport stamp will be a thing of the past for visitors to the 29 countries of the European Union Schengen Area starting November 10. That’s when the new automated Entry/Exit System EES comes into effect. It’s separate from the delayed ETIAS visa waiver program which is due to start in the first half of 2025 and will mean travelers from outside the EU will be charged a €7 entry fee that is valid for three years. Destination inspiration Get your stamps while you can with these European vacation picks. Il dolce far niente – “the sweetness of doing nothing” – has been perfected by Italians on their vacations in southern sweet spots such as Naples Ischia Puglia the Amalfi Coast and Capri. These remarkable photographs by UK photographer Lucy Laucht show how to relax the Italian way. In Hungary the Gresham Palace is the grandest Budapest hotel of them all having sat in its prime position overlooking the River Danube for more than a century. Here’s how this architectural gem looks in its current incarnation. Finally if you’re considering a longer stay an idyllic Swedish town is selling off land with prices so low you might think they’re mistakes. But Gotene 320 kilometers 200 miles southwest of Stockholm is indeed selling plots with prices starting at just 1 krona or 9 US cents per square meter 11 square feet. Aviation news An airline accidentally offered a megadeal on first-class tickets with 300 lucky customers getting savings of 85 off. Here’s what happened next. The staff at Australian flag carrier Qantas must have been flat-out like a lizard drinking sorting that mess out. And if you don’t understand that lingo it’s time to check out our guide to Aussie slang. An airport on the edge of southeast Europe has been named the best connected in the world with more than 300 direct flights to unique destinations. It’s been networking fast too; it only opened in 2018.

  24. Darrelherse表示:

    en guvenilir slot siteleri: bonus veren slot siteleri – oyun siteleri slot

  25. Josephkerie表示:

    Experts foretoken a competitive trial with Fulham likely having the sharpness due to their higher position in the unite and recent form. Extent, Birmingham’s home advantageously could reap exchange for an overpowering encounter.

    Predicted Score: Birmingham 1 – 2 Fulham http://birminghamvsfulham.ru/.

  26. JasonHes表示:

    This city is developing the world’s tallest timber tower again работа для девушек The US city of Milwaukee is already home to the world’s tallest timber tower. But another even taller wooden skyscraper could be added to its skyline designed by Vancouver-based studio Michael Green Architects MGA. The firm recently released plans for the development which includes a 55-story tower made principally from mass timber — thick compressed multilayered panels of solid wood. If built it would usurp the current world title holder the 25-story Ascent tower by Korb Associates Architects as well as becoming the tallest building in the state of Wisconsin. MGA which specializes in wooden architecture hopes that the project will set a “new global benchmark for mass timber construction.” The project is part of the redevelopment of the Marcus Performing Arts Center which opened in 1969 and won the Honor Award for Excellence in Architectural Design from the American Institute of Architects in 1970. Led by Neutral which bills itself as a “regenerative development company” the redesign will transform what is currently the center’s concrete parking lot into a space with residential units offices restaurants cafes grocery stores and public plazas. According to MGA construction will cost an estimated 700 million. The plan is currently going through the city’s approval process during which it is expected to evolve. Why timber? While the use of mass timber is steadily increasing worldwide thanks to changes in building regulations and shifting attitudes towards the material it has yet to match the sheer height of buildings made of concrete and steel — although a slew of timber high-rises have been proposed in recent years. MGA says its tower design would be approximately 600 feet 182 meters tall — more than double the 284 feet 87 meter tall Ascent tower. “The race for height is important” said Michael Green an architect and founder of MGA. “It’s not about showing off it’s about showing what’s possible to the public.” He argued that the reason timber skyscrapers haven’t yet become mainstream is because climate change hasn’t been at the center of the conversation. “We didn’t really need to challenge the status quo of steel and concrete” he said. “But because those materials are so hard on the climate we had to find a different way to build towers and big buildings in general.”

  27. Leonardanire表示:

    en cok kazandiran slot siteleri: deneme bonusu veren siteler – guvenilir slot siteleri 2024 https://sweetbonanza.network/# sweet bonanza free spin demo

發佈留言

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