aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/string/italics
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/javascript/reference/global_objects/string/italics
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/string/italics')
-rw-r--r--files/pt-br/web/javascript/reference/global_objects/string/italics/index.html68
1 files changed, 68 insertions, 0 deletions
diff --git a/files/pt-br/web/javascript/reference/global_objects/string/italics/index.html b/files/pt-br/web/javascript/reference/global_objects/string/italics/index.html
new file mode 100644
index 0000000000..62467f37c6
--- /dev/null
+++ b/files/pt-br/web/javascript/reference/global_objects/string/italics/index.html
@@ -0,0 +1,68 @@
+---
+title: String.prototype.italics()
+slug: Web/JavaScript/Reference/Global_Objects/String/italics
+tags:
+ - Descontinuado
+ - JavaScript
+ - Prototipo
+ - String
+ - italics()
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/String/italics
+---
+<div>{{JSRef}} {{deprecated_header}}</div>
+
+<p>O método <code>italics()</code> cria um elemento HTML <code><a href="https://wiki.developer.mozilla.org/pt-BR/docs/Web/HTML/Element/i" title="https://wiki.developer.mozilla.org/pt-BR/docs/Web/HTML/Element/i">&lt;i&gt;</a></code> que faz com que uma string fique em itálico.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox notranslate"><code><var>str</var>.italics()</code></pre>
+
+<h3 id="Valor_retornado">Valor retornado</h3>
+
+<p>Uma string contendo um elemento HTML <code><a href="https://wiki.developer.mozilla.org/pt-BR/docs/Web/HTML/Element/i" title="https://wiki.developer.mozilla.org/pt-BR/docs/Web/HTML/Element/i">&lt;i&gt;</a></code>.</p>
+
+<h2 id="Descrição">Descrição</h2>
+
+<p>O método <code>italics()</code> cria uma string dentro de uma tag <code>&lt;i&gt;</code>:<br>
+ <code>"&lt;i&gt;str&lt;/i&gt;"</code>.</p>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="Usando_italics">Usando <code>italics()</code></h3>
+
+<p>O exemplo a seguir usa métodos do objeto global String para alterar a formatação de uma string:</p>
+
+<pre class="brush: js notranslate">var worldString = 'Olá, mundo';
+console.log(worldString.blink()); // &lt;blink&gt;Olá, mundo&lt;/blink&gt;
+console.log(worldString.bold()); // &lt;b&gt;Olá, mundo&lt;/b&gt;
+console.log(worldString.italics()); // &lt;i&gt;Olá, mundo&lt;/i&gt;
+console.log(worldString.strike()); // &lt;strike&gt;Olá, mundo&lt;/strike&gt;
+</pre>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-string.prototype.italics', 'String.prototype.italics')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Navegadores_compatíveis">Navegadores compatíveis</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("javascript.builtins.String.italics")}}</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{jsxref("String.prototype.blink()")}}</li>
+ <li>{{jsxref("String.prototype.bold()")}}</li>
+ <li>{{jsxref("String.prototype.strike()")}}</li>
+</ul>