From 73d9be8f9c1ff3622f37fffa117d0f435f7ad4a0 Mon Sep 17 00:00:00 2001 From: tristantheb Date: Sun, 11 Apr 2021 16:41:56 +0200 Subject: L10N: Update content of the HTML section - Part 1 (#299) * UPDATE: Update content of the HTML page with en-US * FIX: Removing KS or the translation * UPDATE: Update content of the Applying_color page * UPDATE: Update content of the Block-level_elements page * UPDATE: Update content of the CORS_enabled_image page * UPDATE: Update content of the Date_and_time_formats page * FIX: Fixing html position * Minor fix on html * UPDATE: Update content of the Inline_elements page * UPDATE: Update content of the Link_types page * UPDATE: Update content of the Microdata page * UPDATE: Update content of the Microformats page * UPDATE: Update content of the Preloading_content page * UPDATE: Updating the q_mode_&_s_mode page + removing old invalid link * UPDATE: Removing xref KS and update links * UPDATE: Update content layout and remove old link on Using_the_application_cache page * L10N: Translation of the Viewport_meta_tag page * Review - HTML Applying colors - minor typos and a missing paragraph * Review - HTML Block Elements - minor typos / lint * Review - HTML CORS Images - minor rewording / link fix * Review - HTML date time formats - linting typography, minor changes * Review - HTML Landing page - minor rewording, typos * Review - HTML Inline elements - minor linting / example translation * Review - HTML link types - lint HTML / rm brs * Review - HTML microdata - minor linting * Review - HTML microformat - minor typofixes * Review - HTML preloading - minor changes * Review - HTML quirks - minor changes / rm deadlinked section * Review - HTML element references - minor change * Review - HTML Meta Viewport - minor changes Co-authored-by: julieng --- files/fr/web/html/inline_elements/index.html | 189 +++++++++++++-------------- 1 file changed, 94 insertions(+), 95 deletions(-) (limited to 'files/fr/web/html/inline_elements') diff --git a/files/fr/web/html/inline_elements/index.html b/files/fr/web/html/inline_elements/index.html index 5c8664af08..823dc1dd6e 100644 --- a/files/fr/web/html/inline_elements/index.html +++ b/files/fr/web/html/inline_elements/index.html @@ -1,24 +1,25 @@ --- -title: Éléments en-ligne +title: Éléments en ligne slug: Web/HTML/Inline_elements tags: + - Beginner - Débutant - - Elements en ligne + - Elements - Guide - HTML + - HTML Elements + - Layout - Reference translation_of: Web/HTML/Inline_elements original_slug: Web/HTML/Éléments_en_ligne --- -
{{HTMLSidebar}}
+

Les éléments HTML (Hypertext Markup Language) étaient historiquement catégorisés comme des éléments de type « bloc » (block en anglais) ou de type « en ligne » (inline en anglais). Comme il s'agit d'une caractéristique de présentation, elle est aujourd'hui spécifiée par CSS dans le module de spécification Flow Layout qui définit l'organisation visuelle par défaut des éléments (le « flux » normal). Les éléments en lignes n'occupent que l'espace entre leurs balises et s'insèrent dans le flux du contenu plutôt que de créer un nouveau « bloc » visuel. Dans cet article, nous verrons en détails ces éléments en ligne et leurs différences par rapport aux éléments de bloc.

-

En HTML, les éléments en ligne (inline elements en anglais) sont ceux qui occupent l'espace délimités par leurs balises plutôt que d'interrompre le flux du contenu. Dans cet article, nous étudierons ces éléments en ligne et également leurs différences quant aux éléments de bloc (block-level elements).

- -
-

Note : Un élément en ligne ne commence pas sur une nouvelle ligne et prend uniquement la largeur qui lui est nécessaire.

+
+

Note : Un élément en ligne ne commence pas sur une nouvelle ligne et prend uniquement la largeur qui lui est nécessaire.

-

Éléments en ligne et éléments de bloc : un exemple

+

Éléments en ligne et éléments de bloc : un exemple

Un exemple vaut mieux qu'une longue explication. Voici pour commencer la feuille de style CSS que nous utiliserons :

@@ -26,17 +27,17 @@ original_slug: Web/HTML/Éléments_en_ligne background-color:#ee3; } -

Élément en ligne

+

Élément en ligne

Le fragment de code HTML qui suit utilise un élément en ligne avec la classe highlight :

-
<p>The following span is an <span class="highlight">inline element</span>;
-its background has been colored to display both the beginning and end of
-the inline element's influence.</p>
+
<p>L'élément span qui suit est un <span class="highlight">élément en ligne</span> ;
+son arrière-plan est coloré afin d'illustrer la zone couverte par cet élément en
+ligne.</p>
-

Dans cet exemple, l'élément {{HTMLElement("p")}} (le paragraphe) est un élément de bloc qui contient du texte. Dans ce texte, on a un élément {{HTMLElement("span")}} qui est un élément en ligne. L'élément <span> étant un élément en ligne, le paragraphe est bien affiché sous la forme d'un flux de texte sans rupture :

+

Dans cet exemple, l'élément <p> (le paragraphe) est un élément de bloc qui contient du texte. Dans ce texte, on a un élément <span> qui est un élément en ligne. L'élément <span> étant un élément en ligne, le paragraphe est bien affiché sous la forme d'un flux de texte sans rupture :

-

{{EmbedLiveSample("Élément_en_ligne", 600, 80)}}

+

{{EmbedLiveSample("Inline", "", 120)}}

-

Élément de bloc

+

Élément de bloc

-

Transformons l'exemple précédent pour passer d'un élément <span> à un élément {{HTMLElement("div")}} qui est un élément de bloc :

+

Transformons l'exemple précédent pour passer d'un élément <span> à un élément <div> qui est un élément de bloc :

-
<p>The following div is an <div class="highlight">block-level element;</div>
-its background has been colored to display both the beginning and end of
-the block-level element's influence.</p>
+
<p>L'élément div qui suit est un <div class="highlight">élément de bloc</div> ;
+son arrière-plan est coloré afin d'illustrer la zone couverte par cet élément de
+bloc.</p>