aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/html/element/conteúdo/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/html/element/conteúdo/index.html')
-rw-r--r--files/pt-br/web/html/element/conteúdo/index.html101
1 files changed, 101 insertions, 0 deletions
diff --git a/files/pt-br/web/html/element/conteúdo/index.html b/files/pt-br/web/html/element/conteúdo/index.html
new file mode 100644
index 0000000000..1a1832de04
--- /dev/null
+++ b/files/pt-br/web/html/element/conteúdo/index.html
@@ -0,0 +1,101 @@
+---
+title: '<content>: The Shadow DOM Content Placeholder element (obsolete)'
+slug: Web/HTML/Element/conteúdo
+translation_of: Web/HTML/Element/content
+---
+<div>{{Deprecated_header}}</div>
+
+<p><span class="seoSummary">The <strong>HTML <code>&lt;content&gt;</code> element</strong>—an obsolete part of the <a href="/en-US/docs/Web/Web_Components">Web Components</a> suite of technologies—was used inside of <a href="/en-US/docs/Web/Web_Components/Shadow_DOM">Shadow DOM</a> as an {{glossary("insertion point")}}, and wasn't meant to be used in ordinary HTML.</span> It has now been replaced by the {{HTMLElement("slot")}} element, which creates a point in the DOM at which a shadow DOM can be inserted.</p>
+
+<div class="note">
+<p><strong>Note: </strong>Though present in early draft of the specifications and implemented in several browsers, this element has been removed in later versions of the spec, and should not be used. It is documented here to assist in adapting code written during the time it was included in the spec to work with newer versions of the specification.</p>
+</div>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">Content categories</a></th>
+ <td><a href="/en-US/docs/Web/HTML/Content_categories#Transparent_content_model" title="HTML/Content_categories#Transparent_content_model">Transparent content</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted content</th>
+ <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Tag omission</th>
+ <td>{{no_tag_omission}}</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted parent elements</th>
+ <td>Any element that accepts flow content.</td>
+ </tr>
+ <tr>
+ <th scope="row">DOM interface</th>
+ <td>{{domxref("HTMLContentElement")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Attributes" name="Attributes">Attributes</h2>
+
+<p>This element includes the <a href="/en-US/docs/Web/HTML/Global_attributes">global attributes</a>.</p>
+
+<dl>
+ <dt><code>select</code></dt>
+ <dd>A comma-separated list of selectors. These have the same syntax as CSS selectors. They select the content to insert in place of the <code>&lt;content&gt;</code> element.</dd>
+</dl>
+
+<h2 id="Example">Example</h2>
+
+<p>Here is a simple example of using the <code>&lt;content&gt;</code> element. It is an HTML file with everything needed in it.</p>
+
+<div class="note">
+<p><strong>Note:</strong> For this code to work, the browser you display it in must support Web Components. See <a href="/en-US/docs/Web/Web_Components#Enabling_Web_Components_in_Firefox">Enabling Web Components in Firefox</a>.</p>
+</div>
+
+<pre class="brush: html">&lt;html&gt;
+ &lt;head&gt;&lt;/head&gt;
+ &lt;body&gt;
+  &lt;!-- The original content accessed by &lt;content&gt; --&gt;
+  &lt;div&gt;
+    &lt;h4&gt;My Content Heading&lt;/h4&gt;
+    &lt;p&gt;My content text&lt;/p&gt;
+  &lt;/div&gt;
+
+  &lt;script&gt;
+  // Get the &lt;div&gt; above.
+  var myContent = document.querySelector('div');
+  // Create a shadow DOM on the &lt;div&gt;
+  var shadowroot = myContent.createShadowRoot();
+  // Insert into the shadow DOM a new heading and
+  // part of the original content: the &lt;p&gt; tag.
+  shadowroot.innerHTML =
+  '&lt;h2&gt;Inserted Heading&lt;/h2&gt; &lt;content select="p"&gt;&lt;/content&gt;';
+  &lt;/script&gt;
+
+ &lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<p>If you display this in a web browser it should look like the following.</p>
+
+<p><img alt="content example" src="https://mdn.mozillademos.org/files/10077/content-example.png" style="height: 383px; width: 716px;"></p>
+
+<h2 id="Specifications">Specifications</h2>
+
+<p>This element is no longer defined by any specifications.</p>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("html.elements.content")}}</p>
+
+<h2 id="See_also" name="See_also">See also</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/Web_Components">Web Components</a></li>
+ <li>{{HTMLElement("shadow")}}, {{HTMLElement("slot")}}, {{HTMLElement("template")}}, {{HTMLElement("element")}}</li>
+</ul>
+
+<div>{{HTMLRef}}</div>