--- title: Commonly-used macros slug: MDN/Structures/Macros/Commonly-used_macros translation_of: MDN/Structures/Macros/Commonly-used_macros ---
Cette page présente un grand nombre de macros à usage général créées pour une utilisation avec MDN. Pour avoir des informations sur l'utilisation de ces macros, voir Utilisation des macros et Utiliser les liens macros . Voir les autres macros pour avoir des informations sur les macros qui sont rarement utilisées, ou utilisées dans des contextes spécifiques, ou obsolètes. Il y a aussi une liste complète de toutes les macros MDN.
Voir aussi le Guide style CSS pour l'utilisation des styles disponibles.
En général, vous ne devez pas utiliser des macros pour créer des liens arbitraires. Utilisez le Lien dans l'interface de l'éditeur pour créer des liens.
Examples:
Il existe différentes macros pour des liens vers des pages dans les zones de référence spécifiques MDN.
\{{cssxref("cursor")}}, results in: {{ cssxref("cursor") }}.\{\{domxref("Node")\}\} results in {{ domxref("Node") }}.\{\{htmlattrxref("lang")\}\} will create this link: {{htmlattrxref("lang")}}. \{\{htmlattrxref("type","input")\}\} will create this link: {{htmlattrxref("type","input")}}.\{\{SVGAttr("d")\}\} creates this link: {{SVGAttr("d")}}.\{\{Bug(123456)\}\}. This gives you: {{ Bug(123456) }}.\{\{WebkitBug(31277)\}\} inserts {{ WebkitBug(31277) }}.{{TemplateLink("Previous")}}, {{TemplateLink("Next")}}, and {{TemplateLink("PreviousNext")}} provide navigation controls for articles which are part of sequences. For the single-way templates, the only parameter needed is the wiki location of the previous or next article in the sequence. For {{TemplateLink("PreviousNext")}}, the two parameters needed are the wiki locations of the appropriate articles. The first parameter is for the previous article and the second is for the next article.
Modèles pour presque toutes les grandes collection de pages. Ils permettent généralement de revenir à la page principale de référence/Guide/tutoriel et de mettre l'article dans la catégorie appropriée.
{{TemplateLink("optional_inline")}} and {{TemplateLink("ReadOnlyInline")}} are used in API documentation, usually when describing the list of properties of an object or parameters of a function.
Usage: \{{optional_inline()}} or \{{ReadOnlyInline()}}. Example:
isCustomObject {{ReadOnlyInline()}}true, that the object is a custom one.{{TemplateLink("non-standard_inline")}} inserts an in-line mark indicating the API has not been standardized and is not on a standards track.
\{{non-standard_inline}}
{{TemplateLink("experimental_inline")}} inserts an in-line mark indicating the API is not widely implemented and may change in the future.
\{{experimental_inline}}
ExamplesIn these macros the parameter (when specified) should be one of the strings "html", "js", "css", or "gecko", followed by the version number.
{{TemplateLink("deprecated_inline")}} inserts an in-line deprecated mark to discourage the use of an API that is officially deprecated. Note: "Deprecated" means that the item should no longer be used, but still functions. If you mean that it no longer works at all, use the term "obsolete."
Don't use the parameter in any browser-agnostic area (HTML, APIs, JS, CSS, …).
\{{deprecated_inline}} or \{{deprecated_inline("gecko5")}}
{{TemplateLink("obsolete_inline")}} inserts an in-line obsolete mark to prevent the use of, for example, a function, method or property which is officially obsolete.
Don't use the parameter in any browser-agnostic area (HTML, APIs, JS, CSS, …).
\{{obsolete_inline}} or \{{obsolete_inline("js1.8.5")}}
These macros are mostly used on the WebAPI page. See {{anch("Creating new badges")}} for information on creating a new badge.
These templates have the same semantics as their inline counterparts described above. The templates should be placed directly underneath the main page title (or breadcrumb navigation if available) in the reference page. They can also be used to mark up a section on a page.
\{{Non-standard_header()}} {{ Non-standard_header() }}\{{SeeCompatTable()}} {{ SeeCompatTable() }}\{{deprecated_header()}} {{ Deprecated_header() }}\{{deprecated_header("gecko5")}} {{ Deprecated_header("gecko5") }} Don't use the parameter in any browser-agnostic area (HTML, APIs, JS, CSS, …).\{{obsolete_header()}} {{ Obsolete_header() }}\{{obsolete_header("gecko30")}} {{ Obsolete_header("gecko30") }} Don't use the parameter in any browser-agnostic area (HTML, APIs, JS, CSS, …).The {{TemplateLink("AvailableInWorkers")}} macro inserts a localised note box indicating that a feature is available in a Web worker context.