2251922 vues

CSS

Sébastien Merour
publié le 13/06/2020 à 16h15 | modifé le 13/06/2020 à 19h00
Catégorie : Langages | Commentaires (59267)
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.

59267 Commentaire(s)
  1. user
    PatrickliG
    26/11/2026 à 10h21  commentaire modifé
    Читатели получат представление о том, как современные технологии влияют на развитие медицины. Обсуждаются новые методы лечения, персонализированный подход и роль цифровых решений в повышении качества медицинских услуг. Обратиться к источнику - лечение алкоголиков

  2. user
    CharlesLen
    26/11/2026 à 08h19  commentaire modifé
    Who really benefits from skipping the groundwork here? The temptation is to jump straight to whichever option looks cheaper or faster on a spreadsheet and sort out the rest later, and that shortcut has a habit of coming back. Getting ad accounts for one person right starts before any commitment, because the details that trip people up later are load-bearing: who controls access, what happens at renewal, how a suspension or billing issue gets handled when there is no backup operator. This page lays out those foundational checks without dressing them up as secrets. It treats the boring parts as the parts that decide the outcome, which is exactly right for someone with no cushion to fall back on, and it gives you a checklist mindset before you spend anything or sign anything.

  3. user
    TerryWrigh
    26/11/2026 à 08h19  commentaire modifé
    If you need to sort through translator options quickly, keep a short list of checks handy. First, confirm the languages and specialisms on the profile rather than trusting a general description. Second, read more than one review, and look for comments about deadlines and communication, not just quality. Third, note whether the listed services match the format of your document, since a literary translator may not be the right fit for a technical manual. A site built around finding a reliable translator makes those checks easier because the profile, services and feedback are presented together. Write your criteria down before you browse, then tick them off as you go. It sounds mechanical, but it stops you from being swayed by the first impressive bio you read, and it gives you a fair basis for comparing two people who look equally good on paper.

  4. user
    Gerardotop
    26/11/2026 à 08h17  commentaire modifé
    Two audiences come up whenever this tool is discussed: the person who needs a sentence translated right now and the developer who needs ten thousand of them handled automatically. A translator API integration sits at the far end of that range, and it is where most of the real decisions live. The guide treats the API as its own subject rather than a footnote, covering authentication, request structure and the practical question of what happens when a batch fails halfway. For quick reference during a working day, the layout lets you jump straight to the section you need: web interface, desktop client, or code-level access. Keep it open in a tab and you can answer a colleague's question about rate limits or supported languages without re-reading documentation from scratch. That is the useful kind of reference, one that fits into a five-minute gap.

  5. user
    Ralphloors
    26/11/2026 à 08h16  commentaire modifé
    Three things decide whether a free account is usable for real work, and the page breaks each of them down in order. First, it examines what the plan lets you produce and keep once a project is finished. Second, it points out the places where a Supa Creative editor review separates marketing claims from the settings you actually see in the interface. Third, it explains which features sit behind the paid tier and which remain open on the free plan. That sequence means you can check the fit against your own projects without guessing. Work through the sections in order, and you finish with a clear picture of what to expect on day one and where the upgrade would change your routine. It reads like a checklist rather than a brochure.

Ajoutez un commentaire :