0% found this document useful (0 votes)
15 views5 pages

DOCTYPE HTML

This document is an HTML template for a mini site featuring a form that collects user information such as first name, last name, email, and phone number. It includes validation for the phone number to ensure it contains only digits and outlines objectives and terms of use. The design is simple, with a clean layout and responsive styling.

Uploaded by

Josip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

DOCTYPE HTML

This document is an HTML template for a mini site featuring a form that collects user information such as first name, last name, email, and phone number. It includes validation for the phone number to ensure it contains only digits and outlines objectives and terms of use. The design is simple, with a clean layout and responsive styling.

Uploaded by

Josip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

<!

DOCTYPE html>

<html lang="fr">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Mini Site</title>

<style>

body {

font-family: Arial, sans-serif;

margin: 0;

padding: 0;

background-color: #f7f7f7;

.container {

max-width: 600px;

margin: 20px auto;

padding: 20px;

background-color: #fff;

border-radius: 5px;

box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

h1, h2 {

color: #333;
}

label {

display: block;

margin-bottom: 5px;

input[type="text"],

input[type="email"],

input[type="tel"],

input[type="submit"] {

width: 100%;

padding: 10px;

margin-bottom: 15px;

border: 1px solid #ccc;

border-radius: 5px;

box-sizing: border-box;

input[type="checkbox"] {

margin-right: 5px;

input[type="submit"] {

background-color: #007bff;
color: #fff;

border: none;

cursor: pointer;

input[type="submit"]:hover {

background-color: #0056b3;

</style>

<script>

// Fonction pour valider le champ de téléphone

function validerFormulaire() {

var telephone = document.getElementById("telephone").value;

// Vérifier si le numéro de téléphone ne contient que des chiffres

if (!/^\d+$/.test(telephone)) {

alert("Veuillez saisir uniquement des chiffres pour le numéro de téléphone.");

return false; // Empêcher la soumission du formulaire

return true; // Le formulaire peut être soumis

</script>

</head>

<body>

<div class="container">

<h1>Objectifs</h1>
<p>Objectif 1: Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br>

Objectif 2: Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br>

Objectif 3: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.</p>

<h2>Formulaire</h2>

<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>"


onsubmit="return validerFormulaire()">

<label for="prenom">Prénom:</label>

<input type="text" id="prenom" name="prenom" required>

<label for="nom">Nom:</label>

<input type="text" id="nom" name="nom" required>

<label for="email">Email:</label>

<input type="email" id="email" name="email" required>

<label for="telephone">Numéro de téléphone:</label>

<input type="tel" id="telephone" name="telephone" required>

<input type="checkbox" id="conditions" name="conditions" value="accepte" required>

<label for="conditions">J'accepte les conditions d'utilisation</label>

<input type="submit" value="Soumettre">

</form>
<h2>Conditions d'utilisation</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.</p>

</div>

</body>

</html>

You might also like