Let's talk about Html <input> Elements

Let's talk about Html <input> Elements

Most commonly used input elements

Hi everyone,

Today we are going to learn some input elements in html

what is input tag in html?

The input tag is self closing tag means no closing tag required. Using input tag we can take input from users like names, numbers, email, password etc.

Syntax :

<html>
   <head><title>Input elements</title></head>
   <body>
      <label for="name">Name</label>
      <input type="text" placeholder="enter your name">
   </body>
</html>

see the above output,

using 'type' attribute we can define what type of input can take from user

for ex: email we use type="email" for password type="password"

different input attributes:

EX:

<input type="text">
<input type="email">
<input type="password">
<input type="button">
<input type="checkbox">
<input type="file">
<input type="radio">

The above input elements are most commonly used in html document.

.

.

So thanks everyone for reading this article, I know this is very short but you can

learn or explore more things about input from MDN docs.