Html Label and Input tags




Input tag

The html input tag creates a section where the user inputs information.
You can input many diffrent types of data.
Here is a example of a input:

Make your code look like this:

You can make the user only input a kind of data, like numbers, or file, or even colors!

To do this, add a attributte called "type". There are diffrent types. Here is a list of them:


And there are many more!

Label tag

The label tag can label the input tag.
To do this, add a attributte called name to the input tag and give it a name
Then, add a attributte called for to the label tag and type the name of the input with the name like this:

Now, it should look like this:



Home
Report a problem