Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at

翻譯不完整。請協助 翻譯此英文文件

HTML 意指「超文件標示語言」(HyperText Markup Language),是打造網頁的基石,用來撰寫與視覺化地呈現網頁。它定義了網頁的內容,但不定義網頁的功能。

HTML 新增了「標記」(markup)到標準英文文件中。「超文件」是指從原網頁到另一網頁的連結,而這項技術造就了今日的全球資訊網。藉由撰寫與上載網頁到網際網路中,一旦您的網站上線,您就變成全球資訊網的積極參與者。HTML 不僅支援顯示影像,也支援其他媒體。借助於 HTML,每一個人都能創建靜態以及動態網站。HTML 是一種描述網路文件的結構和語意內容的語言。網頁內容被加上的 HTML 元素標記,包括 <head><title><body><article><section><p><div><span><img><picture> 等等。這些元素構成了網站的基石。


  • HTML 參考資料

    在我們的 extensive reference 中,您將會找到構成 HTML 的每個元素和屬性的細節。

  • HTML 指南

    關於如何使用 HTML 以及 HTML 指導與完整例子,請參考我們的 HTML developer guide

  • HTML 介紹

    如果您是網站開發的新手,請先閱讀我們的 introduction,以知道 HTML 是什麼並且如何使用。


區塊層級元素(Block-Level Elements)
HTML (Hypertext Markup Language) 元素通常分為「區塊層級」(block-level)元素或是「行內」(inline)元素。一個區塊層級的元素會佔據它的父級元素(container)的所有空間。因而創造了「區塊」(block)。這篇文章將會解釋這是什麼意思。
跨來源資源共享圖片(CORS enabled image)
HTML5 規格為圖片導入了跨來源(crossorigin的屬性,它搭配合適的 CORS 標頭(CORS header),允許從外站載入由 <img> 元素所定義的圖片被用在畫布(canvas)上,看起來就像從本站載入。
跨來源資源共享設定屬性(CORS settings attributes)
In HTML5, some HTML elements which provide support for CORS, such as <img> or<video>, have a crossorigin attribute (crossOrigin property), which lets you configure the CORS requests for the element's fetched data. These attributes are enumerated, and have the following possible values:
Controlling spell checking in HTML forms
Firefox 2 introduces spell checking support to text areas and text fields in web forms. The user can specify using the about:config interface whether or not spellchecking is enabled and whether to check both text areas and text fields or only text areas.
DASH Adaptive Streaming for HTML 5 Video
Dynamic Adaptive Streaming over HTTP (DASH) is an adaptive streaming protocol. This means that it allows for a video stream to switch between bit rates on the basis of network performance, in order to keep a video playing.
Focus management in HTML
In the HTML5 working draft, the activeElement DOM attribute and the hasFocus() DOM method give the programmer the ability to have better control of the interactivity of the page due to the user's actions. For example, both of them can be used for statistical usage purposes, tracking the number of clicks on certain links of a page, measuring the amount of time an element is focused, and so forth. In addition, when combined with AJAX technology, they help minimize the number of requests to the server, depending on the user activity and the page layout.
Global attributes
Global attributes may be specified on all HTML elements, even those not specified in the standard. That means that any non-standard elements must still permit these attributes, even though using those elements means that the document is no longer HTML5-compliant. For example, HTML5-compliant browsers hide content marked as ..., even though is not a valid HTML element.
HTML attribute reference
Elements in HTML have attributes; these are additional values that configure the elements or adjust their behavior in various ways to meet the criteria the users want.
HTML element reference
本頁列出所有的 HTML 元素
HTML reference
HTML is the language that describes the structure and the semantic content of a Web document; it consists of elements, each of which may be modified by some number of attributes.
HTML (Hypertext Markup Language) elements are usually "inline" elements or "block-level" elements. An inline element occupies only the space bounded by the tags that define the inline element. The following example demonstrates the inline element's influence:
In HTML, the following link types indicate the relationship between two documents, in which one links to the other using an , , or element.
Media formats supported by the HTML audio and video elements
The <audio> and <video> elements provide support for playing audio and video media without requiring plug-ins
Microformats (sometimes abbreviated μF) are small patterns of HTML for marking up entities like people, organizations, events, locations, blog posts, products, reviews, resumes, recipes, etc.
They are simple conventions to embed semantics in HTML and quickly provide an API to be used by search engines, aggregators, and other tools.
Optimizing your pages for speculative parsing
Traditionally in browsers the HTML parser has run on the main thread and has blocked after a tag until the script has been retrieved from the network and executed. The HTML parser in Firefox 4 and later supports speculative parsing off the main thread. It parses ahead while scripts are being downloaded and executed. As in Firefox 3.5 and 3.6, the HTML parser starts speculative loads for scripts, style sheets and images it finds ahead in the stream. However, in Firefox 4 and later the HTML parser also runs the HTML tree construction algorithm speculatively. The upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was already scanned for scripts, style sheets and images. The downside is that there's more work lost when the speculation fails.
Using the application cache
HTML5 provides an application caching mechanism that lets web-based applications run offline. Developers can use the Application Cache (AppCache) interface to specify resources that the browser should cache and make available to offline users. Applications that are cached load and work correctly even if users click the refresh button when they are offline.

View All...


Guides and tutorials

HTML 開發者指南
在 MDN 的文章中,不僅教導了用 HTML 撰寫網站的明確技術,也展示了其他您可能會覺得易於使用的文章與指導。 這個指南可以提供 HTML 開發上的編輯課程、技巧與資訊。

Join the Web layout community

Choose your preferred method for joining the discussion:


 最近更新: thomasaria,