HTML forms input and textarea Free Web Design Tutorials
Home   HTML CSS JavaScript PHP MySQL Usability Glossary
HTMLBasicsCreating a DocumentHead and Body ElementsFormatting TextCreating ListsEmbedding ImagesURLs ExplainedLinking to DocumentsCreating TablesForms - BasicsInput and TextareaForms - Input and TextareaSelect ListsFramesetsThe Frame ElementNested FramesetsTargeting FramesInline Frames

Home > HTML > Forms - Input and Textareaprinter version

HTML - Forms - Input and Textarea

HTML offers a number of widgets that can be used in forms to collect user information and forward it.

The <input> Element

The <input> element has no closing tag and uses the type="type" attribute to specify which type of control to use where "type" is one of the following.



<input> Attributes

Input allows a number of attributes some of which are shown below.



A Basic Form Example using Input
<form action="myform.php" method="post">
    Please tell us your vehicle type:
    <input type="text" size="50" maxlength="75" name="vehicle_type">
    <input type="submit" name="Send">
</form>


The <textarea> Element

The <textarea> element produces a multi-line text box for user input. This element has a closing tag and any text between the start and end tags will be displayed within the text box when the form downloads.

<textarea> Attributes

Textarea allows a number of attributes some of which are shown below.



A Basic Form Example using Textarea
<form action="myform.php" method="post">
    <textarea rows="4" cols="30" name="comments">
        Text in here will appear in the textarea box.
    </textarea>
    <input type="submit" name="Send">
</form>


Previous - HTML forms basics Previous - Forms - Basics     Next - Forms - Select Lists Next - HTML forms select lists


Privacy | Terms | Contact | Links | Sitemap | RSS Feeds RSS and JavaScript Feeds
©2009 www.webdesignworkmate.co.uk all rights reserved 
Design and Production by smallbizonline website design © 2000-2009
Valid HTML 4.01! Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0Valid CSS!
Recommended Reading
html_and_xhtml

html and xhtml complete reference

learning web design beginners guide