Skip to content

Instantly share code, notes, and snippets.

@ktzanev
Last active March 13, 2017 12:42
Show Gist options
  • Save ktzanev/8dd10c36992e0291f9b21d8d83a31d6f to your computer and use it in GitHub Desktop.
Save ktzanev/8dd10c36992e0291f9b21d8d83a31d6f to your computer and use it in GitHub Desktop.
CSS : Priorités (GistRun)
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Priorités CSS</title>
<link rel="stylesheet" href="main.css">
<style>
h1 {
text-align: left;
}
</style>
</head>
<body>
<h1 style="text-align: right;">Titre &lt;h1&gt;</h1>
<div class="message">
La priorités du <code>text-align</code> de <code>&lt;h1&gt;</code> sont dans l'ordre:
<ol>
<li><code>right</code> (défini dans l'élémént lui même)
<li><code>left</code> (défini dans un tag <code>&lt;style&gt;</code>)
<li><code>center</code> (défini dans un fichier <code>css</code> externe)
</ol>
</div>
</body>
</html>
h1 {
color: red;
text-align: center;
}
div.message {
background-color: #fee;
padding: 1em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment