Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Synthèse cours HTML/CSS</title>
- <link href="https://fonts.googleapis.com/css?family=Handlee&display=swap" rel="stylesheet">
- <meta charset="utf-8">
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- }
- .embedFooter {
- display: none;
- }
- body {
- background-color: #f1c40f;
- }
- #page {
- max-width: 1024px;
- margin: auto;
- background-color: #ecf0f1;
- background-color: white;
- font-family: 'Handlee', cursive;
- padding: 20px;
- }
- h1, h2, h3, h4 {
- font-family: 'Handlee', cursive;
- }
- h1 {
- color: #2c3e50;
- margin-bottom: 20px;
- padding-bottom: 5px;
- border-bottom: 2px dashed #e74c3c;
- text-align: center;
- }
- h2, h3, h4 {
- margin-bottom: 10px;
- }
- h4 {
- text-decoration: underline;
- }
- p {
- margin-bottom: 10px;
- }
- .pastebin {
- margin-bottom: 20px;
- }
- .info {
- color: white;
- padding: 20px;
- background-color: #3498db;
- margin-bottom: 20px;
- }
- hr {
- margin: 40px;
- }
- </style>
- </head>
- <body>
- <div id="page">
- <h1>Synthèse cours HTML/CSS</h1>
- <h2>1. Le HTML</h2>
- <h3>Code de base d'une page HTML</h3>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/rYYMFvYg"></script>
- </div>
- <hr>
- <h3>Plusieurs façons d'utiliser les balises</h3>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/ZdcKb5rP"></script>
- </div>
- <div class="info">
- Attention à ne pas oublier la balise fermante !
- </div>
- <div class="info">
- Certaines balises n'ont pas de balise fermante (img, br)
- </div>
- <hr>
- <h3>Les balises HTML</h3>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/9D1Gqf93"></script>
- </div>
- <h2>2. Le CSS</h2>
- <h3>Différentes façons de donner du style à un élément</h3>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/CZzHBEN4"></script>
- </div>
- <hr>
- <h3>Les marges</h3>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/d1njv0qk"></script>
- </div>
- <hr>
- <h3>Les polices Google Font</h3>
- <p>L'intégration d'une police <a href="https://fonts.google.com/" target="_blank">Google Font</a> se fait en deux étapes</p>
- <h4>1. Déclaration de la police dans la balise <strong>head</strong> du code HTML</h4>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/CU8VjHMS"></script>
- </div>
- <h4>2. Ajout de la propriété <strong>font-family</strong> là où on souhaite appliquer la police</h4>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/sr8ykvMg"></script>
- </div>
- <hr>
- <h3>Les floats</h3>
- <p>Pour positionner des blocs HTML les uns à côtés de autres il faut utiliser la propriété CSS <strong>float</strong></p>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/djdRMBkY"></script>
- </div>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/0bk3twMb"></script>
- </div>
- <div class="info">
- Utilisez un <strong>div</strong> avec une classe <strong>clear</strong>
- pour remettre le ou les blocs suivants les floats en dessous.
- </div>
- <hr>
- <h3>Les erreurs fréquentes</h3>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/t9Fjqi3f"></script>
- </div>
- <div class="pastebin">
- <script src="https://pastebin.com/embed_js/0uW65JQD"></script>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement