aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/string/small
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/string/small')
-rw-r--r--files/fr/web/javascript/reference/global_objects/string/small/index.html79
-rw-r--r--files/fr/web/javascript/reference/global_objects/string/small/index.md66
2 files changed, 66 insertions, 79 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/string/small/index.html b/files/fr/web/javascript/reference/global_objects/string/small/index.html
deleted file mode 100644
index 5fba5a585f..0000000000
--- a/files/fr/web/javascript/reference/global_objects/string/small/index.html
+++ /dev/null
@@ -1,79 +0,0 @@
----
-title: String.prototype.small()
-slug: Web/JavaScript/Reference/Global_Objects/String/small
-tags:
- - Deprecated
- - HTML wrapper methods
- - JavaScript
- - Méthode
- - Prototype
- - Reference
- - String
-translation_of: Web/JavaScript/Reference/Global_Objects/String/small
-original_slug: Web/JavaScript/Reference/Objets_globaux/String/small
----
-<div>{{JSRef}}{{deprecated_header}}</div>
-
-<p>La méthode <code><strong>small()</strong></code> permet de créer un élément HTML {{HTMLElement("small")}}, ce qui permet d'afficher la chaîne de caractères dans une fonte de petite taille.</p>
-
-<h2 id="Syntaxe">Syntaxe</h2>
-
-<pre class="syntaxbox"><var>str</var>.small()</pre>
-
-<h3 id="Valeur_de_retour">Valeur de retour</h3>
-
-<p>Une chaîne de caractères représentant un élément HTML {{HTMLElement("small")}}.</p>
-
-<h2 id="Description">Description</h2>
-
-<p>La méthode <code>small()</code> encadre la chaîne courante dans une balise <code>&lt;small&gt;</code> :<br>
- <code>"&lt;small&gt;str&lt;/small&gt;</code>"</p>
-
-<h2 id="Exemple">Exemple</h2>
-
-<h3 id="Utiliser_la_méthode_small()">Utiliser la méthode <code>small()</code></h3>
-
-<p>L'exemple suivant illustre les différentes méthodes de <code>String</code> permettant de changer la taille d'une chaîne de caractères :</p>
-
-<pre class="brush:js">var worldString = "Coucou monde";
-
-console.log(worldString.small()); // &lt;small&gt;Coucou monde&lt;/small&gt;
-console.log(worldString.big()); // &lt;big&gt;Coucou monde&lt;/big&gt;
-console.log(worldString.fontsize(7)); // &lt;font size="7"&gt;Coucou monde&lt;/fontsize&gt;</pre>
-
-<p>L'objet {{domxref("HTMLElement.style", "element.style")}} permet d'utiliser l'attribut <code>style</code> de l'élément et de le manipuler de façon générique. Par exemple :</p>
-
-<pre class="brush: js">document.getElementById('IDélément').style.fontSize = '0.7em'</pre>
-
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">État</th>
- <th scope="col">Commentaires</th>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype.small', 'String.prototype.small')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Définition initiale. Implémentée dans JavaScript 1.0. Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript additionnelles pour les navigateurs web.</td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype.small', 'String.prototype.small')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td>Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript additionnelles pour les navigateurs web.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("javascript.builtins.String.small")}}</p>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<ul>
- <li>{{jsxref("String.prototype.fontsize()")}}</li>
- <li>{{jsxref("String.prototype.big()")}}</li>
-</ul>
diff --git a/files/fr/web/javascript/reference/global_objects/string/small/index.md b/files/fr/web/javascript/reference/global_objects/string/small/index.md
new file mode 100644
index 0000000000..f3f5b9941d
--- /dev/null
+++ b/files/fr/web/javascript/reference/global_objects/string/small/index.md
@@ -0,0 +1,66 @@
+---
+title: String.prototype.small()
+slug: Web/JavaScript/Reference/Global_Objects/String/small
+tags:
+ - Deprecated
+ - HTML wrapper methods
+ - JavaScript
+ - Méthode
+ - Prototype
+ - Reference
+ - String
+translation_of: Web/JavaScript/Reference/Global_Objects/String/small
+original_slug: Web/JavaScript/Reference/Objets_globaux/String/small
+---
+{{JSRef}}{{deprecated_header}}
+
+La méthode **`small()`** permet de créer un élément HTML {{HTMLElement("small")}}, ce qui permet d'afficher la chaîne de caractères dans une fonte de petite taille.
+
+## Syntaxe
+
+ str.small()
+
+### Valeur de retour
+
+Une chaîne de caractères représentant un élément HTML {{HTMLElement("small")}}.
+
+## Description
+
+La méthode `small()` encadre la chaîne courante dans une balise `<small>` :
+`"<small>str</small>`"
+
+## Exemple
+
+### Utiliser la méthode `small()`
+
+L'exemple suivant illustre les différentes méthodes de `String` permettant de changer la taille d'une chaîne de caractères :
+
+```js
+var worldString = "Coucou monde";
+
+console.log(worldString.small()); // <small>Coucou monde</small>
+console.log(worldString.big()); // <big>Coucou monde</big>
+console.log(worldString.fontsize(7)); // <font size="7">Coucou monde</fontsize>
+```
+
+L'objet {{domxref("HTMLElement.style", "element.style")}} permet d'utiliser l'attribut `style` de l'élément et de le manipuler de façon générique. Par exemple :
+
+```js
+document.getElementById('IDélément').style.fontSize = '0.7em'
+```
+
+## Spécifications
+
+| Spécification | État | Commentaires |
+| ------------------------------------------------------------------------------------------------------------ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| {{SpecName('ES6', '#sec-string.prototype.small', 'String.prototype.small')}} | {{Spec2('ES6')}} | Définition initiale. Implémentée dans JavaScript 1.0. Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript additionnelles pour les navigateurs web. |
+| {{SpecName('ESDraft', '#sec-string.prototype.small', 'String.prototype.small')}} | {{Spec2('ESDraft')}} | Définie dans l'annexe B (normative) pour les fonctionnalités ECMAScript additionnelles pour les navigateurs web. |
+
+## Compatibilité des navigateurs
+
+{{Compat("javascript.builtins.String.small")}}
+
+## Voir aussi
+
+- {{jsxref("String.prototype.fontsize()")}}
+- {{jsxref("String.prototype.big()")}}