From 844f5103992238c0c23203286dad16a466e89c97 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:09 +0200 Subject: move *.html to *.md --- .../global_objects/string/small/index.html | 79 ---------------------- .../reference/global_objects/string/small/index.md | 79 ++++++++++++++++++++++ 2 files changed, 79 insertions(+), 79 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/string/small/index.html create mode 100644 files/fr/web/javascript/reference/global_objects/string/small/index.md (limited to 'files/fr/web/javascript/reference/global_objects/string/small') 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 ---- -
{{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 :

- -
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 :

- -
document.getElementById('IDélément').style.fontSize = '0.7em'
- -

Spécifications

- - - - - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{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

- - 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..5fba5a585f --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/string/small/index.md @@ -0,0 +1,79 @@ +--- +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 :

+ +
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 :

+ +
document.getElementById('IDélément').style.fontSize = '0.7em'
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{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

+ + -- cgit v1.2.3-54-g00ecf