Tugas 4 isi form


Tugas membuat form dengan input type

Pertemuan 4


Nama : Augista Eksofon Pradana

NRP : 5053231018

Pemrograman Web (M)


Link Tugas  : https://tugas-pweb-augista.vercel.app/isiform.html




Link Tugas :

Link tugas week 4






HTML + Style :

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Registration Page</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f3f3f3;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
        }

        .main {
            background-color: #fff;
            border-radius: 15px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
            padding: 20px;
            width: 300px;
        }

        .main h2 {
            color: #4caf50;
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #555;
            font-weight: bold;
        }

        input[type="text"],
        input[type="email"],
        input[type="password"],
        select,
        textarea {
            width: 100%;
            margin-bottom: 15px;
            padding: 10px;
            box-sizing: border-box;
            border: 1px solid #ddd;
            border-radius: 5px;
        }

        button[type="submit"] {
            padding: 15px;
            border-radius: 10px;
            border: none;
            background-color: #4caf50;
            color: white;
            cursor: pointer;
            width: 100%;
            font-size: 16px;
        }

        input[type="radio"] {
            margin-right: 5px;
        }
    </style>
</head>
<body>
    <div class="main">
        <h2>Registration Form</h2>
        <form action="">
            <label for="first">First Name:</label>
            <input type="text" id="first" name="first" required />

            <label for="last">Last Name:</label>
            <input type="text" id="last" name="last" required />

            <label for="email">Email:</label>
            <input type="email" id="email" name="email" required />

            <label for="password">Password:</label>
            <input type="password" id="password" name="password"
                   pattern="^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9])\S{8,}$"
                   title="Password must contain at least one number,
                          one alphabet, one symbol, and be at
                          least 8 characters long" required />

            <label for="repass">Re-type Password:</label>
            <input type="password" id="repass" name="repass" required />
             

            <label for="kegiatan">Kegiatan:</label>
            <select id="kegiatan" name="kegiatan" required>
                <option value="Bukber">Bukabersama</option>
                <option value="Supporteran">Supporteran</option>
                <option value="RPLgoesMalang">RPLgoesMalang</option>
                <option value="MakanBareng">MakanBareng</option>
            </select>

            <label>Gender:</label>
            <input type="radio" name="gender" value="Male" required /> Male <br>
            <input type="radio" name="gender" value="Female" required /> Female <br>
            <input type="radio" name="gender" value="Other" required /> Other

            <label for="phone">Phone:</label>
            <input type="text" id="phone" name="phone" required />

            <label for="address">Address:</label>
            <textarea id="address" name="address" rows="3" required></textarea>

            <button type="submit">Submit</button>
        </form>
    </div>
</body>
</html>


Komentar

Postingan Populer