Introduction to the Input Type Text
You can put in a single line of words into this. Mainly the input style is needed. Believe it or not, outside of the <form> tag, this is probably one of the most important aspects of it. You can have it used for items like password, checkbox, radio, reset, and submit. The <input> tag is a very diverse tag and can be used for any purpose depending on your needs. Inside, you will be taught the basics on how this works and then you will see how it looks as well. Every item has to be put in and this doesn’t have an end tag to it. I will give you the required items to use and then there is the optional item.
Input - the key tag in getting it started. Most tags require an end tag but in HTML, it isn’t needed.
Type - it’s what it says. You determine the type of input you want it to be.
Name - it determines the name of it in the form.
Maxlength - the purpose of this item is to determine how long you want the input to be. If you do not set one up, it will be unlimited despite the window being small.
Size - more or less is used as the width of the form directly.
Now I’m going to give you a few examples of how it looks. Just remember, you need the <form> tag for it to work properly.
<input type="text" name="name">
Enter your name below:
Just the textbox.
This example show how you can create a textbox with some length and limited quantity of symbols. Try to enter more than 10 symbols.
This example show how you can create a textbox with pre-entered text.
This should give you the basics on how it works and how it looks.