Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,156,214 members, 7,829,351 topics. Date: Thursday, 16 May 2024 at 04:08 AM

Introductions To Form In HTML - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Introductions To Form In HTML (2597 Views)

Please Rate My Nairaland.com Front Page Mock Design In HTML/CSS/JS / I Need A Web Designer With Expertise In HTML And CSS / How To Insert Pictures In HTML File. (2) (3) (4)

(1) (Reply)

Introductions To Form In HTML by binoosmart(m): 12:43am On Apr 28, 2017
HTML Form Control Elements

Control elements that are commonly used:
Text boxes for text and numerical entries
Selection lists for long lists of options, usually appearing in a drop-down list box
Radio buttons, also called option buttons, to select a single option from a predefined list
Check boxes to specify an item as either present or absent
Groups boxes to organize form elements
Text areas for extended entries that can include several lines of text
Buttons that can be clicked to start processing the form
Each control element in which the user can enter information is called a field.
Information entered into a field is called the field value, or simply the value.
In some fields, users are free to enter anything they choose.
Other fields, such as selection lists, limit the user to a predefined list of options.
The <form> Tag
The <form> tag identifies the beginning and end of a form. A single page can include several different forms, but you cannot nest one form inside another.
The general syntax of the <form> tag is:
<form attributes>
form elements and layout tags
</form>
Between the <form> and </form> tags, place the various tags for each of the fields in the form.
Use standard HTML tags to specify the form’s appearance.

A single Web page can contain multiple forms, the <form> tag includes the name attribute.
The name attribute identifies each form on the page.
The name attribute is also needed for programs that retrieve values from the form.

Input Types
The picture below shows other supported HTML input types.
[img]https://1.bp..com/-14LVZmfdKnk/WQE6lYyEgQI/AAAAAAAAEd0/i7eTFV3vtRk3bCV77D_eeZCF5Nm_-rHlwCK4B/s640/Input%2BTypes%2BIn%2BHTML%2BForms.jpg[/img]

Working with Text Boxes
Text boxes are created using the <input> tag.
The general syntax is:
<input type=“type” name=“name” id=“id”>
Type specifies the type of input field name and id attributes identifies the input field for the CGI script
To create a text box, you would enter the tag:
<input type=“text”>
If the type attribute is not included, the Web browser assumes, by default, that you want to create a text box.
The name and id Attribute
The name and id attributes of the <input> tag identifies the input field for the CGI script.
The name attribute represents the older standard, but it is deprecated in HTML 4.01, however, some CGI scripts still recognize only the name attribute
The newest standard uses the id attribute.
The id attribute is required, if a form contains form labels.
It is best to duplicate the information by using both the name and id attributes.
How To Create a Text Box
To create a text box, use the following HTML code:
<input name=“name” id=“id” value=“value” size=“value” maxlength=“value”>
Name and id attributes identify the field
Value attribute assigns a default value to the text box
Size attribute defines the width of the text box in number of characters
Maxlength attribute defines the maximum number of characters allowed in the field
How to Create a Password Field
A password field is a text box in which the characters typed by the user are displayed as bullets or asterisks i.e. ****.
The syntax for creating a Password field is:
<input type=“password”>
Using a password field should not be confused with having a secure connection.
The password itself is not encrypted.
The password field only acts as a mask for a field entry as it is entered.
My Next Topic On Form Will Be Working with Form Labels
source: http://www.icict.com.ng/2017/04/introductions-to-form-in-html.html

To See 19 Steps To Creating A Web Form With HTML With Source Codes.
http://www.icict.com.ng/2017/04/19-practical-steps-to-creating-web.html

(1) (Reply)

Suitable Processor For Programming / ZTE MF286 Firmware / Learn Programming On Whatsapp, Via Chats, Calls, My Videos And Assignments

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.