Input Tags in HTML

 

Input tags are used for getting data's from user such as forms etc.

  • Input tags have several types like Characters, Password, DOB ,Mail-id etc.
  • Syntax of creating input tag is <input type="text">. 
  • Here type attribute means ,it tells to input tag get only like characters number and make masking password,etc.

Example: 

Type something here:  .

Code:

<!DOCTYPE html>
<html>
<head>
     <title>
         Input tags
     </title>
</head>
<body>
<form>
     Mail-Id:<input type="email"> <br>
  Username:<input type="text"><br>
  password:<input type="password"><br>
<input type="submit">
</form>
</body>
</html>


Input tags are also span level elements.Separate them using <br> tag.

Output:

[Please enter details this field doesn't collect your data, try this]

Mail-Id:

Username:

password:



Note: In mail-id field if you failed to enter mail format it gives warning.This is the use of type attribute.


Post a Comment

Post a Comment (0)

Previous Post Next Post