984064 vues

CSS

Sébastien Merour
publié le 13/06/2020 à 16h15 | modifé le 13/06/2020 à 19h00
Catégorie : LangagesCommentaires (5559)
CSS
Description

Le CSS (Cascading Styles Sheets) est un langage informatique permettant de décrire le style, la présentation d'un document HTML. Là où le HTML va se contenter de structurer un document, le CSS va prendre en charge le style, la mise en page d'une page web.

En réalité, le HTML n'a jamais eu besoin du langage CSS pour être exécuté sur un navigateur web. Cependant, le CSS est devenu rapidement une nécessité afin de séparer ce qui relève purement et simplement de la structure d'une page web (c'est le rôle du HTML), de ce qui relève de la mie en page (formes, couleurs, polices de caractères....).

Le style d'une page web peut être défini de 3 façons :

-soit directement dans la page HTML (avec par exemple la balise style, située dans la partie HEAD de la page)

-soit en mode inline (exemple : utilisation de la balise strong pour mettre en gras un texte)

-soit grâce à un fichier CSS, référencé dans la section HEAD de la page.

Il est évident qu'il est préférable d'utiliser la 3ème méthode. En effet : imaginons qu'un développeur souhaite modifier complètement le design d'un site web, sans pour autant modifier la structure des pages web. C'est là que le fichier CSS a son intérêt : le développeur pourra modifier le style du site en ne modifiant que le fichier CSS du site. Ce sera d'autant plus utile si le site web contient de très nombreuses pages.

Il est possible également qu'une page web ou qu'un site fasse appel à plusieurs fichiers CSS. Par exemple, il est fréquent de voir un fichier CSS différent pour chaque taille d'écran, afin de rendre un site 100% responsive.

Par ailleurs, le CSS est devenu de plus en plus puissant au fil des années. Désormais, le CSS permet d'afficher par exemple des animations, ou des graphiques particulièrement complexes.

Les sélecteurs

Le principe du CSS repose sur la sélection : on sélecte un élément (par exemple un type de balise, ou bien une balise possédant un identifiant) pour lui appliquer un style. On pourra par exemple appliquer une couleur rouge pour tous les titres de type H3.

Box Model

Tous les élements HTML (une image, un paragraphe, un formulaire...) peut être considéré comme une boîte. Pour définir cette boîte, on utilise 4 élements :

- Margin (Marge - l'espace qui est en dehors de la bordure)

- Border (Bordure - la bordure qui est autour du padding)

- Padding (Ecart - l'écart entre le contenu et la bordure)

- Content (Contenu - par exemple le texte et les images)

Grid

Grid est un principe CSS permettant d'afficher un Layout en mode "grille". Le développeur peut utiliser ce principe pour positionner des éléments dans une grille, en faisant varier par exemple la taille de chaque case, ou l'orientation de chaque rangée, etc...

Pour afficher un layout en mode Grid, il est nécessaire d'insérer l'instruction display: grid

Flexbox

Auparavant, nous avions 4 formats de Layouts possibles :

- Block, pour les sections d'une page

- Inline, pour le texte

- Table, pour afficher un tableau

- Positioned, pour positionner explicitement un élément.

L'arrivée du concept du Flexbox facilite la création de layout, sans avoir à utiliser les notions de float ou de position.

Pour activer la notion de flexbox sur un élément, il est nécessaire d'appliquer un affichage flex avec l'instruction display: flex

Les proprités d'un conteneur Flex sont les suivantes :

flex-direction

flex-wrap

flex-flow

justify-content

align-items

align-content

Fonctionnalités
Style / Mise en page
Date de création
17/12/1996
Créateur
W3C
Dernière version
3
Langage
CSS
Liens
Aux dernières nouvelles
Depuis 2010, CSS est censé évoluer vers sa version 4. Mais suite au succès de HTML 5 couplé avec CSS 3, il est possible que CSS 4 ne voit jamais le jour, où bien que la notion de version (5 pour HTML et 3 pour CSS) disparaisse, pour devenir des langages en constante évolution.

5559 Commentaire(s)
  1. user
    luxury car rental miami_pmEa
    14/06/2026 à 19h39  commentaire modifé
    Let me save you some serious time, learned this the hard way. Then you actually go to the local office to pick it up. Completely different car waiting for you, check engine light on, and that "low rate"? Doesn't include the mandatory insurance they somehow forgot to mention. Fool me seven times? Yeah that's just Tuesday in Miami, lesson learned. When you're searching for a legit and reliable premium ride to cruise around, do some real digging first and read actual customer reviews. Anyone who's taken the Metro here knows the struggle about this city, especially since the AC must freeze your face off and unlimited miles or forget it. Most of these local agencies are just fancy websites hiding the same beat-up fleet with bought reviews, until I finally found one outfit that actually delivers what's promised. If you are looking for the only straight shooter for premium rides across South Florida, check the current details here: porsche rental https://luxury-car-rental-miami-7.com. Also, definitely bring polarized shades unless you enjoy driving into the apocalypse every single evening. Just drive safe out there and definitely pass on that "tire protection" upsell — total garbage. let me know if you guys have any other clean spots.

  2. user
    luxury car rental miami_tgot
    14/06/2026 à 19h36  commentaire modifé
    Trust me, I've learned everything the hard way so you don't have to. Then you actually show up to the local office to grab the keys. Completely different car sitting there — dents everywhere, smells like cheap air freshener covering something worse, and that "dream price"? Doesn't include the mandatory $50 daily insurance or the $300 "administrative fee" they invent at checkout. Eleven years in South Florida and these clowns still almost get me. If you are trying to find a legitimate luxury fleet without getting ripped off, avoid the airport like the plague. Anyone who's tried the bus here knows exactly what I mean about this city, especially since the AC must be arctic and unlimited miles non-negotiable. Most of these local agencies are just shiny garbage with fake Google reviews bought in bulk hiding overpriced junk, but I eventually found a service with no games, no switch, and no hidden BS in paragraph 12 of the contract. If you are looking for the only honest source for premium rides across South Florida, check the current details here: luxury cars to rent near me luxury cars to rent near me. Yeah, parking in South Beach will cost you a nice bottle of champagne — but that's the Miami tax. Just drive safe out there and definitely skip that "tire and wheel" upsell — pure profit for them, zero value for you. hope this helps some of you save a few bucks.

  3. user
    luxury car rental miami_awEa
    14/06/2026 à 19h34  commentaire modifé
    Let me save you some serious time, learned this the hard way. You spot a sweet deal online: shiny Mercedes, low daily rate, looks perfect. Completely different car waiting for you, check engine light on, and that "low rate"? Doesn't include the mandatory insurance they somehow forgot to mention. Seven years in South Florida and I still almost fall for these tricks. If you are trying to find a legitimate luxury fleet without getting ripped off, avoid the airport like the plague. Miami without real wheels is basically a punishment, whether you are doing Brickell happy hour, Bal Harbour shopping, or a spontaneous drive down to the Keys. I've tried maybe 40 rental companies across Dade, Broward, and Palm Beach, but I eventually found a service with no games, no bait-and-switch, and no hidden asterisks in paragraph 8. If you are looking for the only straight shooter for premium rides across South Florida, check the current details here: luxury auto rental luxury auto rental. Yeah, parking in Brickell will cost you a nice steak dinner — but that's just Miami life. Just drive safe out there and definitely pass on that "tire protection" upsell — total garbage. hope this helps some of you save a few bucks.

  4. user
    luxury car rental miami_psEa
    14/06/2026 à 19h34  commentaire modifé
    Let me tell you about the Miami rental circus — it's wild out here. You spot a sweet deal online: shiny Mercedes, low daily rate, looks perfect. Plus a surprise $2000 hold on your card and a $35 per day GPS you never asked for right before giving you the keys. Seven years in South Florida and I still almost fall for these tricks. If you are trying to find a legitimate luxury fleet without getting ripped off, avoid the airport like the plague. Miami without real wheels is basically a punishment, whether you are doing Brickell happy hour, Bal Harbour shopping, or a spontaneous drive down to the Keys. I've tried maybe 40 rental companies across Dade, Broward, and Palm Beach, but I eventually found a service with no games, no bait-and-switch, and no hidden asterisks in paragraph 8. If you are looking for the only straight shooter for premium rides across South Florida, check the current details here: luxury cars for rental luxury cars for rental. Yeah, parking in Brickell will cost you a nice steak dinner — but that's just Miami life. Anyway, glad there's at least one honest rental joint left in this town, let me know if you guys have any other clean spots.

  5. user
    Richardinoth
    14/06/2026 à 19h30  commentaire modifé
    Ваш провідник у житті Луцька https://43000.com.ua новини міста, культурні події, афіша заходів, бізнес, освіта та корисні поради для мешканців і гостей. Уся важлива інформація про Луцьк в одному місці.

Ajoutez un commentaire :