Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
81 views
in Information Technology by (46.8k points)
closed by

What is TextBox Field ?Write attributes of text field.

1 Answer

+1 vote
by (50.2k points)
selected by
 
Best answer

If the value of the type attribute is “text” i.e. <input type= “Text”>, the form will show a textbox. This textbox accepts the input in one line.

Along with this the TextBox field accepts value, size, name, maxlength, align and tabindex within the <input> tag.

Attributes of Text Field Description
Size It defines the width of the field. It contains no. of visible characters.
Maxlength It defines the maximum length of the field. It contains maximum no. of characters that can be entered in the field.
Name It adds an internal name to the field so the program that handles the form can identify the fields.
Align It defines how the text field will be aligned on the form. Valid entries are: TOP, MIDDLE, BOTTOM, RIGHT, LEFT, TEXTTOP, BASELINE, ABSMIDDLE, ABSBOTTOM.
Tabindex It defines in which order the different fields should be activated when the visitor clicks the tab key.

For Example :

Two textboxes whose internal name (computer can understand the internal name) is “Fname” and “Mname” are created using the value “text” for the type attribute. The internal name is different from the label.

HTML Code :

<form>
Father’s Name:
<input type=”text” size = “20” name=”FName” >
<br>
Mother’s name:
<input type=”text” size = “20” name=”MName”>
</form>

The above code creates two textboxes, each of which is 20 characters wide. The two textboxes are arranged vertically one below the other. The <br> tag does the work of Enter key.

Output :

exapmple of text field

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...