Knowledge check: User input and forms

Knowledge check: User input and forms

  1. When the user clicks the submit button of the following form, what will happen? Select all that apply.

     <form method="POST">
        <input type="text" name="username">
        <input type="password" name="password">
        <button type="submit">Log In</button>
     </form>
    
    • It will use the resources of the server unnecessarily.

    • The server-side will prevent the processing of the request if server-side validation is implemented.

    • The browser will block the form submission.

    • The browser will still allow form submission.

  2. What attribute should be added to the <input> element to ensure the user provides a response?

    • autocomplete

    • required

    • placeholder

    • pattern

  3. What is the risk of using the HTTP GET method for form submission? Check all that apply.

    • The web address may exceed the maximum length accepted by the web server.

    • The form data will be stored in the browser history.

    • The form data will be sent insecurely.

  4. Which of the following is a framework that provides CSS rules for forms and visual consistency? Check all that apply.

    • Bootstrap

    • Tailwind CSS

    • Boilerplate

    • Foundation

  5. The web browser sends a ____ to the web server, and the web server sends back a ____. This is done by means of the HTTP ____ method which accepts values as part of the URL or the HTTP ____ method which submits the values in our form as part of the request.

    Fill in the blank with the correct order from the options below:

    A. GET

    B. POST

    C. Request

    D. Response

    • ABCD

    • ABDC

    • CDAB

    • CDBA

  6. Which of the following values can fill the blank?

    The form action attribute consists of _____ as values. Select all that apply.

    • An absolute URL

    • form status

    • Relative URL

    • HTTP Requests