blob: ed7838fe73f6d37a19aaa0b583ce6a04da5422ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
---
title: '<center>: תגית למרכוז טקסט'
slug: Web/HTML/Element/center
translation_of: Web/HTML/Element/center
---
<div> </div>
<div>
<p>{{HTMLRef}}</p>
<p dir="rtl">תגית <strong><code><center></code></strong> מאגדת בתוכה מספר כותרות <strong><code><h1></code></strong> עד <strong><code><h6></code></strong> ונועדה כדי ליצור כותרות משנה.</p>
<p dir="rtl">* <u><strong>תגית זו אינה חלק מתקן HTML5.</strong></u></p>
<p> </p>
<p>{{EmbedInteractiveExample("pages/tabbed/center.html", "tabbed-standard")}}</p>
<table>
<tbody>
<tr>
<th>קטגוריה</th>
<td>תוכן.</td>
</tr>
<tr>
<th>תוכן מורשה</th>
<td>{{HTMLElement("h1")}}<br>
{{HTMLElement("h2")}}<br>
{{HTMLElement("h3")}}<br>
{{HTMLElement("h4")}}<br>
{{HTMLElement("h5")}}<br>
{{HTMLElement("h6")}}</td>
</tr>
<tr>
<th>תגיות הורים מורשות</th>
<td>תגית זו מורשת להופיע בגוף המסמך אך אינה חייבת להיות כפופה בצורה ישירה אל תגית {{HTMLElement("body")}}.</td>
</tr>
<tr>
<th scope="row">ממשק DOM</th>
<td>{{domxref("HTMLElement")}}</td>
</tr>
</tbody>
</table>
<h2 dir="rtl" id="תארים">תארים</h2>
<p dir="rtl">תגית זו נכללת ברשימת <a href="https://developer.mozilla.org/he/docs/Web/HTML/%D7%AA%D7%90%D7%A8%D7%99%D7%9D_%D7%92%D7%9C%D7%95%D7%91%D7%9C%D7%99%D7%99%D7%9D">התארים הגלובליים</a>.</p>
<dl>
<dt dir="rtl">
<h2 dir="rtl" id="דוגמא_-_מרכוז_טקסט_באמצעות_HTML">דוגמא - מרכוז טקסט באמצעות HTML</h2>
<pre><center>This text will be centered.
<p>So will this paragraph.</p></center></pre>
</dt>
</dl>
<dl>
<dt dir="rtl">
<h2 dir="rtl" id="דוגמא_-_מרכוז_טקסט_באמצעות_CSS">דוגמא - מרכוז טקסט באמצעות CSS</h2>
<pre><div style="text-align:center">This text will be centered.
<p>So will this paragraph.</p></div></pre>
</dt>
</dl>
<dl>
<dt dir="rtl">
<h2 dir="rtl" id="דוגמא_2_-_מרכוז_טקסט_באמצעות_CSS">דוגמא 2 - מרכוז טקסט באמצעות CSS</h2>
<pre><p style="text-align:center">This line will be centered.<br>
And so will this line.</p></pre>
</dt>
</dl>
<h2 dir="rtl" id="ראה_גם">ראה גם</h2>
<ul>
<li>{{Cssxref("text-align")}}</li>
<li>{{Cssxref("display")}}</li>
</ul>
</div>
<div> </div>
<div> </div>
<div>{{obsolete_header()}}</div>
<p><span class="seoSummary">The obsolete <strong>HTML Center Element</strong> (<strong><code><center></code></strong>) is a <a href="/en-US/docs/HTML/Block-level_elements" title="HTML/Block-level_elements">block-level element</a> that displays its block-level or inline contents centered horizontally within its containing element.</span> The container is usually, but isn't required to be, {{HTMLElement("body")}}.</p>
<p>This tag has been deprecated in HTML 4 (and XHTML 1) in favor of the <a href="/en-US/docs/Web/CSS" title="/en-US/docs/Web/CSS">CSS</a> {{Cssxref("text-align")}} property, which can be applied to the {{HTMLElement("div")}} element or to an individual {{HTMLElement("p")}}. For centering blocks, use other CSS properties like {{Cssxref("margin-left")}} and {{Cssxref("margin-right")}} and set them to <code>auto</code> (or set {{Cssxref("margin")}} to <code>0 auto</code>).</p>
<h2 id="DOM_interface">DOM interface</h2>
<p>This element implements the {{domxref("HTMLElement")}} interface.</p>
<div class="note">
<p><strong>Implementation note:</strong> up to Gecko 1.9.2 inclusive, Firefox implements the {{domxref("HTMLSpanElement")}} interface for this element.</p>
</div>
<h2 id="Example_1" name="Example_1">Note</h2>
<p>Applying {{Cssxref("text-align")}}<code>:center</code> to a {{HTMLElement("div")}} or {{HTMLElement("p")}} element centers the <em>contents</em> of those elements while leaving their overall dimensions unchanged.</p>
|