forms

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Forms</title>
</head>

<body>
    <h2>This is HTML forms tutorial</h2>
    <form action="backend.php">
        <label for="name">
            <div>
                Name: <input type="text" name="myName" id="name">
            </div>
        </label>
        <br>
        <label for="role">
            <div>
                Role: <input type="text" name="myRole" id="role">
            </div>

        </label>
        <br>
        <label for="email">
            <div>
                Email: <input type="email" name="myEmail" id="email">
            </div>

        </label>
        <br>
        <div>
            Date: <input type="date" name="myDate">
        </div>
        <br>
        <div>
            <label for="eligibility">Are you eligible?</label>
            <input type="checkbox" name="myEligibility" id="eligibility">
        </div>
        <br>
        <div>
            Gender: Male <input type="radio" name="myGender"> Female <input type="radio" name="myGender"> Other <input
                type="radio" name="myGender">
        </div>
        <br>
        <div>
            <label for="writing">
                Write about yourself: <br><textarea name="myText" id="writing" cols="30" rows="10"></textarea>
            </label>
        </div>
        <br>
        <div>
            <label for="car">Car:</label>
            <select name="myCar" id="car">
                <option value="ind">Indica</option>
                <option value="swf" selected>swift</option>
                <option value="audi">audi</option>
            </select>
        </div>
        <br>
        <div>
            <input type="submit" value="Submit now">
            <input type="reset" value="Reset now">
        </div>
    </form>

    <!-- hme form me kya kis type ka rakhna h ye sab hm input: se kr skte h  -->
    <!-- gender me hmne dono ka name same rkha h isilie koi ek hi select ho pa rha h  -->
    <!-- label lgane se jiska jo column h vo khd select ho jata h aur vha cursor chla jata h  -->
</body>

</html>

Comments

Popular posts from this blog

css tutorial

css selectors

developer tools