HTML input text text input field

 HTML input text The text input field is used to allow netizens to enter text. Unlike input password , input text does not turn the text into hidden symbols, but simply displays the content entered by the netizen, and can only display a single line of text. Use textarea tags to display multiple lines of content .


HTML input text Example of text input field
<form>
Please enter text: <input type="text" name="field name">
</form>
Please enter text for the results

:


Since input text is usually used in HTML Form to allow netizens to fill in the data, it must be placed in the <form></form> tag, so that after the netizens fill in the data and send the form, the data can be smoothly sent to the back-end program for processing . The name in the example refers to the name of this field, which can be set by yourself. It is recommended to write in English letters.

In addition, you can use CSS to the input text design more beautiful style, such as the width, in the distance ( padding ), border ( border ), background ( background ) and even text font ( font-Family ), etc. If you want to do some interactive special effects, you can also add JavaScript events, which changes quite a bit.

Post a Comment

0 Comments