diff options
Diffstat (limited to 'files/fa/web/html/element/data')
| -rw-r--r-- | files/fa/web/html/element/data/index.html | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/files/fa/web/html/element/data/index.html b/files/fa/web/html/element/data/index.html new file mode 100644 index 0000000000..9d06506179 --- /dev/null +++ b/files/fa/web/html/element/data/index.html @@ -0,0 +1,94 @@ +--- +title: <data> +slug: Web/HTML/Element/data +translation_of: Web/HTML/Element/data +--- +<div>{{HTMLRef}}</div> + +<p>The <strong>HTML <code><data></code> element</strong> links a given content with a machine-readable translation. If the content is time- or date-related, the {{HTMLElement("time")}} element must be used.</p> + +<div>{{EmbedInteractiveExample("pages/tabbed/data.html", "tabbed-standard")}}</div> + +<p class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples </a> and send us a pull request.</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="/en-US/docs/HTML/Content_categories">Content categories</a></th> + <td><a href="/en-US/docs/HTML/Content_categories#Flow_content">Flow content</a>, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a>, palpable content.</td> + </tr> + <tr> + <th scope="row">Permitted content</th> + <td><a href="/en-US/docs/HTML/Content_categories#Phrasing_content">Phrasing content</a>.</td> + </tr> + <tr> + <th scope="row">Tag omission</th> + <td>{{no_tag_omission}}</td> + </tr> + <tr> + <th scope="row">Permitted parents</th> + <td>Any element that accepts <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a>.</td> + </tr> + <tr> + <th scope="row">DOM interface</th> + <td>{{domxref("HTMLDataElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="Attributes">Attributes</h2> + +<p>This element's attributes include the <a href="/en-US/docs/HTML/Global_attributes">global attributes</a>.</p> + +<dl> + <dt>{{htmlattrdef("value")}}</dt> + <dd>This attribute specifies the machine-readable translation of the content of the element.</dd> +</dl> + +<h2 id="Example">Example</h2> + +<p>The following example displays product names but also associates each name with a product number.</p> + +<pre class="brush: html"><p>New Products</p> +<ul> + <li><data value="398">Mini Ketchup</data></li> + <li><data value="399">Jumbo Ketchup</data></li> + <li><data value="400">Mega Jumbo Ketchup</data></li> +</ul> +</pre> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'semantics.html#the-data-element', '<data>')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>No change from {{SpecName('HTML5 W3C')}}</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-data-element', '<data>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + + + +<p>{{Compat("html.elements.data")}}</p> + +<h2 id="See_also">See also</h2> + +<ul> + <li>The HTML {{HTMLElement("time")}} element.</li> +</ul> |
