Complete the code to create a form that sends data to the server.
<form action=[1] method="post"> <input type="text" name="username" aria-label="Username"> <button type="submit">Submit</button> </form>
The action attribute tells the form where to send the data. Here, it sends to /submit.
Complete the code to specify the HTTP method for the form submission.
<form action="/submit" method=[1]> <input type="email" name="email" aria-label="Email"> <button type="submit">Send</button> </form>
The method attribute defines how data is sent. post is used to send data securely.
Fix the error in the input field to make it required for submission.
<form action="/submit" method="post"> <input type="text" name="fullname" [1] aria-label="Full Name"> <button type="submit">Submit</button> </form>
The required attribute makes sure the user fills this field before submitting.
Fill both blanks to create a password input field with a label.
<label for=[1]>Password:</label> <input type=[2] id="pass" name="password" aria-required="true">
type="text" instead of password.The label uses for="pass" to link to the input with id="pass". The input type password hides the typed characters.
Fill all three blanks to create a form with a checkbox and submit button.
<form action=[1] method=[2]> <input type=[3] id="agree" name="terms" aria-label="Agree to terms"> <label for="agree">I agree to the terms</label> <button type="submit">Submit</button> </form>
type="text" for the checkbox input.method="get" when post is preferred for forms.The form sends data to /register using post. The input type checkbox lets users agree to terms.