La création d’un site web statique pour la gestion de vérification des billets dans une…
- User
La création d’un site web statique pour la gestion de vérification des billets dans une agence de voyage le code html complet
- Assistant
.container { max-width: 600px; margin: 0 auto; padding: 30px; background-color: #f2f2f2; }
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: bold; }
.input-field { width: 100%; padding: 10px; font-size: 16px; }
.btn { width: 100%; padding: 10px; font-size: 16px; background-color: #4CAF50; color: white; border: none; cursor: pointer; }
.btn:hover { background-color: #45a049; }
- User
Quel est le code CSS que l'on peut y associer ?
- Assistant
Voici un exemple de code CSS que l'on peut associer au site web statique de gestion de vérification des billets :
<style> h1 { text-align: center; margin-top: 50px; } .container { max-width: 600px; margin: 0 auto; padding: 30px; background-color: #f2f2f2; } .form-group { margin-bottom: 20px; } label { display: block; font-weight: bold; } .input-field { width: 100%; padding: 10px; font-size: 16px; } .btn { width: 100%; padding: 10px; font-size: 16px; background-color: #4CAF50; color: white; border: none; cursor: pointer; } .btn:hover { background-color: #45a049; } </style>Ce code CSS définit une mise en forme basique pour les éléments du site web tel que le titre, le formulaire, les champs de saisie, le bouton, etc.
- User
Pourrais tu me l'inclure dans le code HTML précédent ?
- Assistant
Bien sûr ! Voici le code HTML complet avec le code CSS inclus :
<!DOCTYPE html> <html> <head> <title>Gestion de vérification des billets</title> <style> h1 { text-align: center; margin-top: 50px; } .container { max-width: 600px; margin: 0 auto; padding: 30px; background-color: #f2f2f2; } .form-group { margin-bottom: 20px; } label { display: block; font-weight: bold; } .input-field { width: 100%; padding: 10px; font-size: 16px; } .btn { width: 100%; padding: 10px; font-size: 16px; background-color: #4CAF50; color: white; border: none; cursor: pointer; } .btn:hover { background-color: #45a049; } </style> </head> <body> <h1>Gestion de vérification des billets</h1> <div class="container"> <form action="#"> <div class="form-group"> <label for="ticketNumber">Numéro du billet:</label> <input type="text" id="ticketNumber" class="input-field" required> </div> <div class="form-group"> <label for="passengerName">Nom du passager:</label> <input type="text" id="passengerName" class="input-field" required> </div> <div class="form-group"> <label for="ticketStatus">Statut du billet:</label> <select id="ticketStatus" class="input-field" required> <option value="valid">Valide</option> <option value="invalid">Invalide</option> </select> </div> <button type="submit" class="btn">Enregistrer</button> </form> </div> </body> </html> - User
Maintenant crée seulement une zone qui insére le code CSS dans celui du HTML sous forme de lien
- Assistant
Bien sûr ! Voici le code HTML avec le lien vers un fichier CSS externe :
<!DOCTYPE html> <html> <head> <title>Gestion de vérification des billets</title> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>Gestion de vérification des billets</h1> <div class="container"> <form action="#"> <div class="form-group"> <label for="ticketNumber">Numéro du billet:</label> <input type="text" id="ticketNumber" class="input-field" required> </div> <div class="form-group"> <label for="passengerName">Nom du passager:</label> <input type="text" id="passengerName" class="input-field" required> </div> <div class="form-group"> <label for="ticketStatus">Statut du billet:</label> <select id="ticketStatus" class="input-field" required> <option value="valid">Valide</option> <option value="invalid">Invalide</option> </select> </div> <button type="submit" class="btn">Enregistrer</button> </form> </div> </body> </html>Dans ce code HTML, le lien vers le fichier CSS externe a été ajouté à l'aide de la balise
<link>avec l'attribut qui pointe vers le fichier "styles.css". Ainsi, le fichier CSS peut être maintenu séparément dans un fichier distinct, permettant une meilleure organisation et modularité du code.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.