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/main/index.html | 167 ++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 files/ca/web/html/element/main/index.html (limited to 'files/ca/web/html/element/main') diff --git a/files/ca/web/html/element/main/index.html b/files/ca/web/html/element/main/index.html new file mode 100644 index 0000000000..ecab39cd8c --- /dev/null +++ b/files/ca/web/html/element/main/index.html @@ -0,0 +1,167 @@ +--- +title:
+slug: Web/HTML/Element/main +tags: + - Element + - HTML + - HTML grouping content + - Reference +translation_of: Web/HTML/Element/main +--- +

{{HTMLRef}}

+ +

L'element HTML <main> representa el contingut principal de el {{HTMLElement("body")}} d'un document o aplicació. L'àrea de contingut principal està constituïda per contingut directament relacionat amb el tema central d'un document o amb la funcionalitat central d'una aplicació. Aquest contingut ha de ser exclusiu del document, excloent qualsevol contingut que es repeteixi en un conjunt de documents com a barres laterals, enllaços de navegació, informació sobre drets d'autor, logotips de llocs i formularis de cerca (tret que la funció principal del document sigui un formulari de cerca).

+ + + + + + + + + + + + + + + + + + + + + + + + +
Categories de contingutContingut dinàmic, contingut palpable.
Contingut permèsContingut dinàmic.
Omissió de l'etiquetaCap; tant les etiquetes d'inici i finalització són obligatoris.
Elements pares permesosQualsevol element que accept Contingut dinàmic.
+

Interfície DOM

+
{{domxref("HTMLElement")}}
+ +

Atributs

+ +

Aquest element només inclou els atribust globals.

+ +

Exemple

+ +
<!-- other content -->
+
+<main>
+  <h1>Apples</h1>
+  <p>The apple is the pomaceous fruit of the apple tree.</p>
+
+  <article>
+    <h2>Red Delicious</h2>
+    <p>These bright red apples are the most common found in many
+    supermarkets.</p>
+    <p>... </p>
+    <p>... </p>
+  </article>
+
+  <article>
+    <h2>Granny Smith</h2>
+    <p>These juicy, green apples make a great filling for
+    apple pies.</p>
+    <p>... </p>
+    <p>... </p>
+  </article>
+
+</main>
+
+<!-- other content -->
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentari
{{SpecName('HTML WHATWG', '#the-main-element', '<main>')}}{{Spec2('HTML WHATWG')}}S'ha eliminat la restricció sobre l'ús de <main> diverses vegades en un document, o com un descendent d'un element {{HTMLElement("article")}}.
{{SpecName('HTML5.1', 'grouping-content.html#the-main-element', '<main>')}}{{Spec2('HTML5.1')}}Sense canvis des de {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5 W3C', 'grouping-content.html#the-main-element', '<main>')}}{{Spec2('HTML5 W3C')}}Definició inicial.
+ +

Navegadors compatibles

+ +

L'element <main> és àmpliament recolzat. Per a Internet Explorer 11 i posteriors, se suggereix que s'afegeixi una funció ària de "main" a l'element <main> per garantir la seva accessibilitat (els lectors de pantalla com JAWS, usats en combinació amb versions anteriors d'Internet Explorer, podran comprendre el significat semàntic de l'element <main> una vegada que aquest atribut role estigui inclòs).

+ +
<main role="main">
+  ...
+</main>
+
+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suport bàsicChrome 26{{ CompatGeckoDesktop("21.0") }}12Opera 16Safari 7
+
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Suport bàsic4.4{{ CompatGeckoMobile("21.0") }}{{CompatNo()}}{{CompatNo()}}7.1
+
+ +

Veure

+ + + +

 

-- cgit v1.2.3-54-g00ecf