aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/html/element/var/index.html
blob: a88e5500da6092c64c61b66dc0a8363cdee5d7db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
title: <var>
slug: Web/HTML/Element/var
translation_of: Web/HTML/Element/var
---
<h2 id="Resumo">Resumo</h2>

<p>O elemento HTML Variable (<code>&lt;var&gt;</code>) representa uma variável em uma expressão matemática ou um contexto de programação.</p>

<h2 id="Contexto_de_utilização">Contexto de utilização</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <td>Permitted content</td>
   <td>Phrasing content</td>
  </tr>
  <tr>
   <td>Tag omission</td>
   <td>Both start and end tags are required</td>
  </tr>
  <tr>
   <td>Permitted parent elements</td>
   <td>Any element that accepts <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content categories#Phrasing content">phrasing content</a>.</td>
  </tr>
  <tr>
   <td>Normative document</td>
   <td><a href="http://www.whatwg.org/html/#the-var-element">HTML, "The <code>var</code> element"</a></td>
  </tr>
 </tbody>
</table>

<h2 id="Atributos">Atributos</h2>

<p><span style="line-height: 21px;">Este elemento somente inclui os </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">global attributes</a><span style="line-height: 21px;">.</span></p>

<h2 id="Interface_DOM">Interface DOM</h2>

<p>Este elemento implementa a interface <code><a href="/en-US/docs/DOM/element" title="DOM/element">HTMLElement</a></code>.</p>

<div class="note">
<p><strong>Implementation note: </strong>up to Gecko 1.9.2 inclusive, Firefox implements the <a href="/en-US/docs/DOM/span" title="DOM/span"><span style="font-family: courier new;">HTMLSpanElement</span></a> interface for this element.</p>
</div>

<h2 id="Propriedades_típicas_padrão_de_estilo">Propriedades típicas padrão de estilo</h2>

<pre class="brush:css">var {
  font-style: italic;
}
</pre>

<h2 id="Exemplo">Exemplo</h2>

<pre class="brush:html">&lt;p&gt; A simple equation: &lt;var&gt;x&lt;/var&gt; = &lt;var&gt;y&lt;/var&gt; + 2 &lt;/p&gt;
</pre>

<p>A simple equation: <var>x</var> = <var>y</var> + 2</p>

<div>{{HTMLRef}}</div>