Home arrow HTML arrow Page 8 - HTML Tutorial
HTML

HTML Tutorial


This article is the September contest winner. The author provides a basic tutorial of HTML, with code samples illustrating headings, lists, background colors, using the Frame tag and more.

Author Info:
By: Anand Narayanaswamy
Rating: 4 stars4 stars4 stars4 stars4 stars / 77
October 11, 2004
TABLE OF CONTENTS:
  1. · HTML Tutorial
  2. · Paragraph Tags, Attributes and Headings
  3. · Using Lists
  4. · Indents and Links
  5. · Working with Images
  6. · Working with Tables
  7. · Working with Frames
  8. · Using Forms, Text, Buttons, and Combo Box
  9. · Text Area, Check Box, and Radio Buttons
  10. · Additional Tags
  11. · Drawing Lines, SUB and SUP Tags
  12. · Test Yourself Questions

print this article
SEARCH DEVARTICLES

HTML Tutorial - Using Forms, Text, Buttons, and Combo Box
(Page 8 of 12 )

Forms are used widely on nearly all Web pages. Web sites collect feedback information, registration details through these forms. If you have ever signed up for free web pages, free email services from yahoo, hotmail etc you may be already aware and familiar with forms. They are applied using <FORM> </FORM> tag. This tag accepts one important attribute namely action, which is used to specify the path for the specified action. HTML forms mainly consist of various form elements, which are specified using <INPUT>tag. This tag accepts many attributes, which are elaborated below along with Form elements.

Text Field

This element is used to enter texts like usernames, addresses etc. Its main attributes are type (value = text), size (value = “Any numeric value”), Maxlength (Value = “Any numeric value”). In the code given below, a user can enter 30 characters initially and then the text scrolls to the left.

Listing 18

    <INPUT type = “text” size = “30”>

Buttons

One of the most important form elements is Button. They serve an integral part in an HTML form. They are mainly used to trigger actions. There are two types of buttons, which are Submit and Reset. Submit buttons delivers the entire data on the form to the server while Reset button clears all your previous entries. The important attributes are type (value = Submit or Reset), Value (value = “Any Text like OK, Cancel”). To create a button labeled Click here, you have to code like as shown below:

Listing 19

    <INPUT type = “submit” value = “Click here”>

Combo box

These boxes enable you to pick an item from a set of values. They are applied using <SELECT> tag as shown below:

Listing 20

<SELECT name = "s1">
<OPTION>India
<OPTION>USA
<OPTION>UK
</SELECT>

The above code creates a list of 3 countries. However, as said before users can select any one item at a time. You can change this behavior by applying an attribute named multiple as shown below:

Listing 21

<SELECT name = "s1" multiple>
<OPTION>India
<OPTION>USA
<OPTION>UK
</SELECT>


blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials