Explorateur CSS
Ce fichier regroupe toutes les principales balises HTML avec leurs propriétés CSS les plus utilisées
Texte (p, h1-h6)
Texte exemple
color
style="color: black;"
p { color: black; }
Texte exemple
font-size
style="font-size: 12px;"
p { font-size: 12px; }
Texte exemple
font-weight
style="font-weight: normal;"
p { font-weight: normal; }
Texte exemple
font-style
style="font-style: normal;"
p { font-style: normal; }
Texte exemple
text-decoration
style="text-decoration: none;"
p { text-decoration: none; }
Texte exemple
text-transform
style="text-transform: none;"
p { text-transform: none; }
Texte exemple
letter-spacing
style="letter-spacing: normal;"
p { letter-spacing: normal; }
Texte exemple
word-spacing
style="word-spacing: normal;"
p { word-spacing: normal; }
Texte exemple
line-height
style="line-height: normal;"
p { line-height: normal; }
Texte exemple
text-align
style="text-align: left;"
p { text-align: left; }
Image (img)

width
style="width: 100px;"
img { width: 100px; }

height
style="height: 100px;"
img { height: 100px; }

object-fit
style="object-fit: fill;"
img { object-fit: fill; }

border-radius
style="border-radius: 0;"
img { border-radius: 0; }

filter
style="filter: none;"
img { filter: none; }

opacity
style="opacity: 1;"
img { opacity: 1; }
Liste (ul)
- Élément 1
- Élément 2
- Élément 3
list-style-type
style="list-style-type: disc;"
ul { list-style-type: disc; }
- Élément 1
- Élément 2
- Élément 3
list-style-position
style="list-style-position: inside;"
ul { list-style-position: inside; }
- Élément 1
- Élément 2
- Élément 3
padding-left
style="padding-left: 0;"
ul { padding-left: 0; }
- Élément 1
- Élément 2
- Élément 3
text-align
style="text-align: left;"
ul { text-align: left; }
Tableau (table)
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
border-collapse
style="border-collapse: collapse;"
table { border-collapse: collapse; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
border-spacing
style="border-spacing: 0;"
table { border-spacing: 0; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
table-layout
style="table-layout: auto;"
table { table-layout: auto; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
width
style="width: auto;"
table { width: auto; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
text-align
style="text-align: left;"
table { text-align: left; }
Lien (a)
Conteneur (div) — Principaux display
Box 1
Box 2
Box 3
display
Flex & Grid — Contrôles d'agencement
Item 1
Item 2
Item 3
flex-direction
Spécifie la direction principale dans laquelle les éléments flex
sont placés.
style="flex-direction: row;"
div { flex-direction: row; }
Voir sur MDN
Item 1
Item 2
Item 3
justify-content
Définit l'alignement des éléments enfants sur l'axe principal d'un
conteneur flex ou grid.
style="justify-content: flex-start;"
div { justify-content: flex-start; }
Voir sur MDN
Item 1
Item 2
Item 3
align-items
Contrôle l'alignement des éléments enfants sur l'axe secondaire d'un
conteneur flex ou grid.
style="align-items: stretch;"
div { align-items: stretch; }
Voir sur MDN
Item 1
Item 2
Item 3
gap
Définit l'espacement entre les lignes et/ou colonnes dans les
layouts flex ou grid.
style="gap: 0;"
div { gap: 0; }
Voir sur MDN
Animations CSS
Animation
animation-name
Nom de l’animation définie dans @keyframes.
style="animation-name: slide;"
div { animation-name: slide; }
Voir sur MDN
Animation
animation-duration
Durée que met l’animation pour s’exécuter.
style="animation-duration: 1s;"
div { animation-duration: 1s; }
Voir sur MDN
Animation
animation-timing-function
Définit la vitesse de progression de l’animation.
style="animation-timing-function: ease;"
div { animation-timing-function: ease; }
Voir sur MDN
Animation
animation-iteration-count
Détermine le nombre de répétitions de l’animation.
style="animation-iteration-count: 1;"
div { animation-iteration-count: 1; }
Voir sur MDN
hover (:hover)
Lien
:hover
focus (:focus)
:focus
S’applique lorsque l’élément reçoit le focus (cliqué ou sélectionné).
input:focus { background-color: yellow; }
Voir sur MDN
first-child (:first-child)
- Item 1
- Item 2
:first-child
last-child (:last-child)
- Item 1
- Item 2
:last-child
before (::before)
after (::after)
Texte (p, h1-h6)
Texte exemple
color
style="color: black;"
p { color: black; }
Texte exemple
font-size
style="font-size: 12px;"
p { font-size: 12px; }
Texte exemple
font-weight
style="font-weight: normal;"
p { font-weight: normal; }
Texte exemple
font-style
style="font-style: normal;"
p { font-style: normal; }
Texte exemple
text-decoration
style="text-decoration: none;"
p { text-decoration: none; }
Texte exemple
text-transform
style="text-transform: none;"
p { text-transform: none; }
Texte exemple
letter-spacing
style="letter-spacing: normal;"
p { letter-spacing: normal; }
Texte exemple
word-spacing
style="word-spacing: normal;"
p { word-spacing: normal; }
Texte exemple
line-height
style="line-height: normal;"
p { line-height: normal; }
Texte exemple
text-align
style="text-align: left;"
p { text-align: left; }
Image (img)

width
style="width: 100px;"
img { width: 100px; }

height
style="height: 100px;"
img { height: 100px; }

object-fit
style="object-fit: fill;"
img { object-fit: fill; }

border-radius
style="border-radius: 0;"
img { border-radius: 0; }

filter
style="filter: none;"
img { filter: none; }

opacity
style="opacity: 1;"
img { opacity: 1; }
Liste (ul)
- Élément 1
- Élément 2
- Élément 3
list-style-type
style="list-style-type: disc;"
ul { list-style-type: disc; }
- Élément 1
- Élément 2
- Élément 3
list-style-position
style="list-style-position: inside;"
ul { list-style-position: inside; }
- Élément 1
- Élément 2
- Élément 3
padding-left
style="padding-left: 0;"
ul { padding-left: 0; }
- Élément 1
- Élément 2
- Élément 3
text-align
style="text-align: left;"
ul { text-align: left; }
Tableau (table)
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
border-collapse
style="border-collapse: collapse;"
table { border-collapse: collapse; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
border-spacing
style="border-spacing: 0;"
table { border-spacing: 0; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
table-layout
style="table-layout: auto;"
table { table-layout: auto; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
width
style="width: auto;"
table { width: auto; }
Nom | Âge |
---|---|
Alice | 25 |
Bob | 30 |
text-align
style="text-align: left;"
table { text-align: left; }
Lien (a)
Conteneur (div) — Principaux display
Box 1
Box 2
Box 3
display
Flex & Grid — Contrôles d'agencement
Item 1
Item 2
Item 3
flex-direction
Spécifie la direction principale dans laquelle les éléments flex
sont placés.
style="flex-direction: row;"
div { flex-direction: row; }
Voir sur MDN
Item 1
Item 2
Item 3
justify-content
Définit l'alignement des éléments enfants sur l'axe principal d'un
conteneur flex ou grid.
style="justify-content: flex-start;"
div { justify-content: flex-start; }
Voir sur MDN
Item 1
Item 2
Item 3
align-items
Contrôle l'alignement des éléments enfants sur l'axe secondaire d'un
conteneur flex ou grid.
style="align-items: stretch;"
div { align-items: stretch; }
Voir sur MDN
Item 1
Item 2
Item 3
gap
Définit l'espacement entre les lignes et/ou colonnes dans les
layouts flex ou grid.
style="gap: 0;"
div { gap: 0; }
Voir sur MDN
Animations CSS
Animation
animation-name
Nom de l’animation définie dans @keyframes.
style="animation-name: slide;"
div { animation-name: slide; }
Voir sur MDN
Animation
animation-duration
Durée que met l’animation pour s’exécuter.
style="animation-duration: 1s;"
div { animation-duration: 1s; }
Voir sur MDN
Animation
animation-timing-function
Définit la vitesse de progression de l’animation.
style="animation-timing-function: ease;"
div { animation-timing-function: ease; }
Voir sur MDN
Animation
animation-iteration-count
Détermine le nombre de répétitions de l’animation.
style="animation-iteration-count: 1;"
div { animation-iteration-count: 1; }
Voir sur MDN
hover (:hover)
Lien
:hover
focus (:focus)
:focus
S’applique lorsque l’élément reçoit le focus (cliqué ou sélectionné).
input:focus { background-color: yellow; }
Voir sur MDN
first-child (:first-child)
- Item 1
- Item 2
:first-child
last-child (:last-child)
- Item 1
- Item 2
:last-child