From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/zh-tw/web/html/element/div/index.html | 95 +++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 files/zh-tw/web/html/element/div/index.html (limited to 'files/zh-tw/web/html/element/div') diff --git a/files/zh-tw/web/html/element/div/index.html b/files/zh-tw/web/html/element/div/index.html new file mode 100644 index 0000000000..87763ae146 --- /dev/null +++ b/files/zh-tw/web/html/element/div/index.html @@ -0,0 +1,95 @@ +--- +title:
+slug: Web/HTML/Element/div +translation_of: Web/HTML/Element/div +--- +

{{HTMLRef}}

+ +

HTML <div> 元素(或是 HTML 文件區塊元素)是本質上不特別代表任何東西的通用内容流容器。它可以成為樣式化用途(使用 classid 屬性)、或是共享如 lang 同一個屬性的元素集合。它應該在沒有其他適合的語義元素(例如{{HTMLElement("article")}} 或 {{HTMLElement("nav")}} )可用時才用。

+ + + + + + + + + + + + + + + + + + + + + + + + +
內容類型流內容、捫及內容。
允許內容流內容
Tag 省略{{no_tag_omission}}
允許父元素任何允許內容流的元素。
DOM 介面{{domxref("HTMLDivElement")}}
+ +

屬性

+ +

這個元素包含全域屬性

+ +

align 元素已過時,不要使用它。

+ +

範例

+ +
<div>
+  <p>這裡可以是任何內容,例如 &lt;p&gt;、&lt;table&gt;。你說了算!</p>
+</div>
+
+ +

結果

+ +

這裡可以是任何內容,例如 <p>、<table>。你說了算!

+ +

規範

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
規範狀態註解
{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '<div>')}}{{Spec2('HTML WHATWG')}}最新的快照以後並無改變
{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '<div>')}}{{Spec2('HTML5 W3C')}}廢棄 align
{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '<div>')}}{{Spec2('HTML4.01')}} 
+ +

瀏覽器相容性

+ + + + +
{{Compat("html.elements.div")}}
+ + + +

詳閱

+ + -- cgit v1.2.3-54-g00ecf