From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/ca/web/html/element/center/index.html | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 files/ca/web/html/element/center/index.html (limited to 'files/ca/web/html/element/center') 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:
+slug: Web/HTML/Element/center +tags: + - Element + - HTML + - Obsolete + - Reference + - Web +translation_of: Web/HTML/Element/center +--- +
{{deprecated_header()}}
+ +

Sumari

+ +

L'element HTML Centre (<center>) és un element a nivell de bloc 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")}}).

+ +

Aquest etiqueta s'ha desaprovat en HTML 4 (i XHTML 1) en favor de la propietat CSS {{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 auto (o posar {{Cssxref("margin")}} auto a 0).

+ +

Interfície DOM

+ +

Aquest element implementa la interfície {{domxref("HTMLElement")}}.

+ +
+

Nota d'implementació: Fins Gecko 1.9.2 inclos, Firefox implementa per aquest element la interfície {{domxref("HTMLSpanElement")}}.

+
+ +

Exemple 1

+ +
<center>This text will be centered.
+<p>So will this paragraph.</p></center>
+
+ +

Exemple 2 (CSS alternatiu)

+ +
<div style="text-align:center">This text will be centered.
+<p>So will this paragraph.</p></div>
+
+ +

Exemple 3 (CSS alternatiu)

+ +
<p style="text-align:center">This line will be centered.<br>
+And so will this line.</p>
+
+ +

Nota

+ +

Aplicant {{Cssxref("text-align")}}: center a un element {{HTMLElement ("div")}} o {{HTMLElement ("p")}} se centra el contingut d'aquests elements, deixant el seu conjunt de dimensions sense canvis.

+ +

Veure

+ + + +
{{HTMLRef}}
-- cgit v1.2.3-54-g00ecf