Web Technologies - Old Questions

5.  Write and HTML code to display a simple form for user login.

5 marks | Asked in 2072

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

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

    <title>Login Form</title>

</head>

<body>

    <h2>Login Form</h2>

    <form name="loginForm" method="POST" action="">

        <div>

            <label for="username">Please enter your username: </label>

            <input type="text" name="username" id="username">

        </div>

        <div>

            <label for="password">Please enter your password: </label>

            <input type="password" name="password" id="password">

        </div>

        <div>

            <input type="submit" name="login" value="login">

        </div>

    </form>

</body>

</html>