aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/html/element/span/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ca/web/html/element/span/index.html')
-rw-r--r--files/ca/web/html/element/span/index.html160
1 files changed, 160 insertions, 0 deletions
diff --git a/files/ca/web/html/element/span/index.html b/files/ca/web/html/element/span/index.html
new file mode 100644
index 0000000000..4a9f13f45f
--- /dev/null
+++ b/files/ca/web/html/element/span/index.html
@@ -0,0 +1,160 @@
+---
+title: <span>
+slug: Web/HTML/Element/span
+tags:
+ - Element
+ - HTML
+ - HTML text-level semantics
+ - 'HTML:Flow content'
+ - Reference
+ - Web
+translation_of: Web/HTML/Element/span
+---
+<h2 id="Sumari">Sumari</h2>
+
+<p>L'<strong>element HTML <code>&lt;span&gt;</code></strong> és un contenidor en línia genèric per a contingut textual, que no representa res essencial. Pot ser utilitzat per agrupar elements amb fins d'estil (utilitzant els atributs <code>class</code> o <code>id</code>), o perquè comparteixen valors d'atribut, com lang. S'ha d'utilitzar només quan cap altre element semàntic sigui apropiat. <code>&lt;span&gt;</code> és molt semblant a un element {{HTMLElement ("div")}}, però {{HTMLElement ("div")}} és un <a href="https://developer.mozilla.org/en-US/docs/HTML/Block-level_elements">element a nivell de bloc</a>, mentre que un <code>&lt;span&gt;</code> és un <a href="https://developer.mozilla.org/en-US/docs/HTML/Inline_elements">element en línia</a>.</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/en-US/docs/HTML/Content_categories">Categories de contingut</a></th>
+ <td><a href="/en-US/docs/HTML/Content_categories#Flow_content">Contingut dinàmic</a>, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">Contingut textual</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Contingut permès</th>
+ <td><a href="/en-US/docs/HTML/Content_categories#Phrasing_content">Contingut textual</a></td>
+ </tr>
+ <tr>
+ <th scope="row">Omissió de l'etiqueta</th>
+ <td>{{no_tag_omission}}</td>
+ </tr>
+ <tr>
+ <th scope="row">Elements pares permesos</th>
+ <td>Qualsevol element que accepti <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">Contingut textual</a>, o qualsevol element que accepti <a href="/en-US/docs/HTML/Content_categories#Flow_content">contingut dinàmic</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Interfície DOM</th>
+ <td>{{domxref("HTMLSpanElement")}} ( <span class="short_text" id="result_box" lang="ca"><span>abans</span> <span>d'HTML</span> <span>5,</span> <span>la interfície</span> <span>era</span></span> {{domxref("HTMLElement")}})</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Atributs">Atributs</h2>
+
+<p>Aquest element només inclou els <a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes">atributs globals</a>.</p>
+
+<h2 id="Exemple_1">Exemple 1</h2>
+
+<pre class="brush:html;gutter:false">&lt;p&gt;&lt;span&gt;Some text&lt;/span&gt;&lt;/p&gt;</pre>
+
+<h3 id="Resultat">Resultat</h3>
+
+<p><span>Some text</span></p>
+
+<h2 id="Exemple_2">Exemple 2</h2>
+
+<pre class="brush:html;gutter:false">&lt;li&gt;&lt;span&gt;
+ &lt;a href="portfolio.html" target="_blank"&gt;See my portfolio&lt;/a&gt;
+&lt;/span&gt;&lt;/li&gt;
+</pre>
+
+<h3 id="CSS">CSS:</h3>
+
+<div class="note">
+<p>li span {<br>
+ background: gold;<br>
+ }</p>
+</div>
+
+<h2 id="Nota">Nota</h2>
+
+<div class="warning">
+<p>És il·legal col·locar un element a nivell de bloc dins d'un element en línia.</p>
+</div>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentari</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td><span class="short_text" id="result_box" lang="ca"><span>La interfície</span> <span>DOM és</span> <span>ara</span></span> {{domxref("HTMLSpanElement")}}.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML4.01', 'struct/global.html#edef-SPAN', '&lt;span&gt;')}}</td>
+ <td>{{Spec2('HTML4.01')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Navegadors_compatibles">Navegadors compatibles</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</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>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Veure">Veure</h2>
+
+<ul>
+ <li>L'element HTML {{HTMLElement("div")}}</li>
+</ul>
+
+<div>{{HTMLRef}}</div>