You're tasked with creating a login form that should securely transmit user credentials. What attributes and input types would you use to ensure secure transmission?

  • Using type="hidden" for both username and password. 
  • Using type="text" for both username and password fields. 
  • Using type="text" for username and type="password" for the password with a standard form submission. 
  • Using type="text" for username and type="password" for the password, combined with HTTPS for form submission. 
The type="password" attribute ensures that the password is obscured on the screen. However, secure transmission also requires HTTPS, which encrypts the data sent from the browser to the server, ensuring that the credentials aren't readable if intercepted. Simply using the type="password" is not enough as it only hides the password from onlookers but doesn't encrypt the data in transit. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *