aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/html/element/hr
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-tw/web/html/element/hr')
-rw-r--r--files/zh-tw/web/html/element/hr/index.html168
1 files changed, 168 insertions, 0 deletions
diff --git a/files/zh-tw/web/html/element/hr/index.html b/files/zh-tw/web/html/element/hr/index.html
new file mode 100644
index 0000000000..219645e454
--- /dev/null
+++ b/files/zh-tw/web/html/element/hr/index.html
@@ -0,0 +1,168 @@
+---
+title: <hr>
+slug: Web/HTML/Element/hr
+tags:
+ - HTML
+ - 元素
+ - 參考
+translation_of: Web/HTML/Element/hr
+---
+<p>{{HTMLRef}}</p>
+
+<p><strong>HTML </strong>的<strong> <code>&lt;hr&gt;</code> 元素</strong>代表在段落層級的焦點轉換(如故事中的場景轉換或某個小節裡的主題移轉)。在之前的 HTML 版本,它代表著一條水平標線。在視覺瀏覽器裡,它現在可能還是以水平標線的型式呈現;但它已經被重新定義為一個語義上的用詞,而不是呈現上的。</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/zh-TW/docs/HTML/Content_categories">內容類型</a></th>
+ <td><a href="/zh-TW/docs/HTML/Content_categories#流內容(Flow_content)" title="HTML/Content categories#Flow content">流內容</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted content</th>
+ <td>否。這是個 {{Glossary("empty element")}}.</td>
+ </tr>
+ <tr>
+ <th scope="row">標籤省略</th>
+ <td>一定要有起始標籤、同時絕不能有結束標籤</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted parent elements</th>
+ <td>任何允許<a href="/zh-TW/docs/HTML/Content_categories#流內容(Flow_content)" title="HTML/Content categories#Flow content">流內容</a>的元素。</td>
+ </tr>
+ <tr>
+ <th scope="row">DOM interface</th>
+ <td>{{domxref("HTMLHRElement")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="屬性">屬性</h2>
+
+<p>這個元素支持<a href="https://developer.mozilla.org/zh-TW/docs/HTML/Global_attributes">全域屬性</a>。</p>
+
+<dl>
+ <dt>{{htmlattrdef("align")}} {{deprecated_inline}}</dt>
+ <dd>設罝頁面上標線的對齊方式。如果沒有指定,預設值是:<code>left。</code></dd>
+ <dt>{{htmlattrdef("color")}} {{Non-standard_inline}}</dt>
+ <dd>用色彩名或16進位值設罝標線的顏色。</dd>
+ <dt>{{htmlattrdef("noshade")}} {{deprecated_inline}}</dt>
+ <dd>設置這個標線沒有陰影。</dd>
+ <dt>{{htmlattrdef("size")}} {{deprecated_inline}}</dt>
+ <dd>設置標線的高度,單位是 px。.</dd>
+ <dt>{{htmlattrdef("width")}} {{deprecated_inline}}</dt>
+ <dd>設置標線的長度,單位是 px;或者也可以用頁面寛度的百分比 (%)表示。</dd>
+</dl>
+
+<h2 id="範例">範例</h2>
+
+<pre class="brush: html">&lt;p&gt;This is the first paragraph of text.
+This is the first paragraph of text.
+This is the first paragraph of text.
+This is the first paragraph of text.
+
+&lt;hr&gt;
+
+&lt;p&gt;This is second paragraph of text.
+This is second paragraph of text.
+This is second paragraph of text.
+This is second paragraph of text.
+</pre>
+
+<p>上面的 HTML會輸出:</p>
+
+<p>This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.</p>
+
+<hr>
+<p>This is second paragraph of text. This is second paragraph of text. This is second paragraph of text. This is second paragraph of text.</p>
+
+<h2 id="Specifications" name="Specifications">規範</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'grouping-content.html#the-hr-element', '&lt;hr&gt;')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Definition of the <code>hr</code> element</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'rendering.html#the-hr-element-0')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Suggested default rendering of the <code>hr</code> element</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', 'grouping-content.html#the-hr-element', '&lt;hr&gt;')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML4.01', 'present/graphics.html#h-15.3', '&lt;hr&gt;')}}</td>
+ <td>{{Spec2('HTML4.01')}}</td>
+ <td>The <code>align</code>, <code>noshade</code>, <code>size</code> and <code>width</code> attributes are deprecated</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">瀏覽器相容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>1.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="參照_(see_also)">參照 (see also)</h2>
+
+<ul>
+ <li>{{HTMLElement('p')}}</li>
+</ul>