HTML Form: Width of the text box

This entry is part 3 of 10 in the series HTML Form

Without specifying the width of the textbox, the size of the box is 20 pixels.

We can specify the size of the text box using pixel, for example 30px.


The HTML script will look like below.

<!DOCTYPE html>
<head lang='en'>     
    <meta charset='UTF-8'>

Phone: <input type='text' name='phone' size='30px'>
Name: <input type='text' name='name'>


Width of Textbox

Series Navigation<< HTML Form: Creating a text box
HTML Form: Multiline textbox using textarea >>