How to Change the Text Box Width With HTML Code

How to Change the Text Box Width With HTML Code thumbnail
Change the size of text boxes in Web forms with the INPUT tag.

You can use a text box to gather data from a Web form, such as a person's name or email address. The default width of a text box is 20 characters, which may be too large or small for your content. The <INPUT> tag allows you to create and modify a text box in your HTML code. One of its attributes is size, which handles the box's width. Adjusting the size adjusts the text box as well.

Instructions

    • 1

      Open the HTML file you want to modify in a text editor, such as Notepad, WordPad or EditPad.

    • 2

      Scroll to the <FORM> tag and find the text box you want to resize. Its code will be similar to:

      <input type="text" size="30" />

    • 3

      Replace the existing size value with the width you want to set. For example, to change the width from "30" to "10," use the following code:

      <input type="text" size="10" />

    • 4

      Select "File" and "Save" from the menu to save your changes.

Related Searches:

References

  • Photo Credit Comstock/Comstock/Getty Images

Comments

You May Also Like

Related Ads

Featured