aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/html/element/center/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ca/web/html/element/center/index.html')
-rw-r--r--files/ca/web/html/element/center/index.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/files/ca/web/html/element/center/index.html b/files/ca/web/html/element/center/index.html
new file mode 100644
index 0000000000..f4bad49b75
--- /dev/null
+++ b/files/ca/web/html/element/center/index.html
@@ -0,0 +1,57 @@
+---
+title: <center>
+slug: Web/HTML/Element/center
+tags:
+ - Element
+ - HTML
+ - Obsolete
+ - Reference
+ - Web
+translation_of: Web/HTML/Element/center
+---
+<div>{{deprecated_header()}}</div>
+
+<h2 id="Sumari">Sumari</h2>
+
+<p>L'element HTML Centre (<code>&lt;center&gt;</code>) és un <a href="https://developer.mozilla.org/en-US/docs/HTML/Block-level_elements">element a nivell de bloc</a> que pot contenir paràgrafs i altres elements a nivell de bloc i en línia. Tot el contingut d'aquest element és centrat horitzontalment dins del seu element contenidor (en general, {{HTMLElement("body")}}).</p>
+
+<p>Aquest etiqueta s'ha desaprovat en HTML 4 (i XHTML 1) en favor de la propietat <a href="https://developer.mozilla.org/en-US/docs/Web/CSS" title="/en-US/docs/Web/CSS">CSS</a> {{Cssxref("text-align")}}, la qual es pot aplicar a l'element {{HTMLElement ("div")}} o a un individu {{HTMLElement ("p")}}. Per centrar blocs, utilitzar altres propietats CSS com {{Cssxref("margin-left")}} i {{Cssxref("margin-right")}} ajustant-los a <code>auto</code> (o posar {{Cssxref("margin")}} <code>auto</code> a 0).</p>
+
+<h2 id="Interfície_DOM">Interfície DOM</h2>
+
+<p>Aquest element implementa la interfície {{domxref("HTMLElement")}}.</p>
+
+<div class="note">
+<p><strong>Nota d'implementació:</strong> Fins Gecko 1.9.2 inclos, Firefox implementa per aquest element la interfície {{domxref("HTMLSpanElement")}}.</p>
+</div>
+
+<h2 id="Example_1" name="Example_1">Exemple 1</h2>
+
+<pre class="brush: html">&lt;center&gt;This text will be centered.
+&lt;p&gt;So will this paragraph.&lt;/p&gt;&lt;/center&gt;
+</pre>
+
+<h2 id="Example_2" name="Example_2">Exemple 2 (CSS alternatiu)</h2>
+
+<pre class="brush: html">&lt;div style="text-align:center"&gt;This text will be centered.
+&lt;p&gt;So will this paragraph.&lt;/p&gt;&lt;/div&gt;
+</pre>
+
+<h2 id="Example_3" name="Example_3">Exemple 3 (CSS alternatiu)</h2>
+
+<pre class="brush: html">&lt;p style="text-align:center"&gt;This line will be centered.&lt;br&gt;
+And so will this line.&lt;/p&gt;
+</pre>
+
+<h2 id="Notes" name="Notes">Nota</h2>
+
+<p>Aplicant {{Cssxref("text-align")}}: <code>center</code> a un element {{HTMLElement ("div")}} o {{HTMLElement ("p")}} se centra el <em>contingut</em> d'aquests elements, deixant el seu conjunt de dimensions sense canvis.</p>
+
+<h2 id="Veure">Veure</h2>
+
+<ul>
+ <li>{{Cssxref("text-align")}}</li>
+ <li>{{Cssxref("display")}}</li>
+</ul>
+
+<div>{{HTMLRef}}</div>