HTML Forms

August 14, 2010 — Leave a comment

Here we will learn about how to create text box for getting any input from the user like username or password.

Following code for creating text box(username):

<input type=”text” name=”username” />

for password box just change the type as Password

<input type=”password” name=”pass” />

Output will be like this for above code:
Username:

Password:

In order to get values from the text box or field we need forms to get the data from the field using their names.

<form action=”” method=””>

<input type=”text” name=”username” />

<input type=”password” name=”pass” />

<input type=”button” value=”Submit”/>

</form>

Output of above code will be

Text field has more attributes like name, size, font, etc., check the TAG reference list on older posts.

Jagan

Posts

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML. <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*


*