Programming Examples

Create an HTML form for user registration:


Create an HTML form for user registration:

(a) Add fields for Name, Email, and Password.

(b) Include radio buttons for gender and a dropdown for country selection.

(c) Add submit and reset button.

Solution

<!DOCTYPE html>
<html>
<head>
    <title>User Registration Form</title>
</head>
<body>

    <h2>User Registration</h2>

    <form>
        <!-- Name -->
        <label>Name:</label><br>
        <input type="text" name="name" required><br><br>

        <!-- Email -->
        <label>Email:</label><br>
        <input type="email" name="email" required><br><br>

        <!-- Password -->
        <label>Password:</label><br>
        <input type="password" name="password" required><br><br>

        <!-- Gender -->
        <label>Gender:</label><br>
        <input type="radio" name="gender" value="male"> Male
        <input type="radio" name="gender" value="female"> Female
        <input type="radio" name="gender" value="other"> Other
        <br><br>

        <!-- Country -->
        <label>Country:</label><br>
        <select name="country">
            <option value="">--Select Country--</option>
            <option value="india">India</option>
            <option value="usa">USA</option>
            <option value="uk">UK</option>
            <option value="australia">Australia</option>
        </select>
        <br><br>

        <!-- Buttons -->
        <input type="submit" value="Submit">
        <input type="reset" value="Reset">

    </form>

</body>
</html>
Output

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad