Une échelle typographique
Toutes les tailles découlent du texte courant (16 px) multiplié par un même rapport. Changez le rapport : toute la hiérarchie suit.
:root { --ratio: 1.25; --texte: 16px; }
.texte { font-size: var(--texte); }
.h4 { font-size: calc(var(--texte) * var(--ratio)); }
.h3 { font-size: calc(var(--texte) * var(--ratio) * var(--ratio)); }
.h2 { font-size: calc(var(--texte) * var(--ratio) * var(--ratio) * var(--ratio)); }
.h1 { font-size: calc(var(--texte) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio)); }Avec un petit rapport, la hiérarchie est discrète ; avec un grand, les titres dominent. On choisit le rapport selon le ton du projet, puis on n’invente plus aucune taille.
Voir le HTML de l’exemple
<p class="h1">Affiche Paris 8</p>
<p class="h2">Identité d’un festival</p>
<p class="h3">Carnet de croquis</p>
<p class="h4">Projets 2026</p>
<p class="texte">Le texte courant sert de base : 16 pixels.</p>