Objectives Design a form Create a form Create text fields

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

1 Introduction to HTML II อุทัย เซี่ยงเจ็น สำนักวิชาเทคโนโลยีสารสนเทศ และการสื่อสาร มหาวิทยาลัยนเรศวร พะเยา.
SE-2840 Dr. Mark L. Hornick 1 HTML input elements and forms.
Tutorial 6 Working with Web Forms
Computing Concepts Advanced HTML: Tables and Forms.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Svetlin Nakov Telerik Corporation
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
XHTML Forms for Data Collection and Submission Chapter 5.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Tutorial #9 – Creating Forms. Tutorial #8 Review – Tables Borders (table, gridlines), Border-collapse: collapse; empty-cells: show; and rowspan, colspan.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
LESSON 10 UNIT K FORMS. WHY FORMS? Free-form – input that is unstructured and does not limit choices. For example, lets say you ask clients to .
CSE 382/ETE 334 Internet and Web Technology Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Svetlin Nakov Telerik Corporation
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Forms Sangeetha Parthasarathy 02/05/2001. Introduction to Forms A form makes it possible to transform your web pages from text to graphics to interactive.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
© 2010 Delmar, Cengage Learning Chapter 8 Collecting Data with Forms.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
2.2 XHTML (cont.). Motto Yea, from the table of my memory I’ll wipe away all trivial fond records. —William Shakespeare.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Macromedia Dreamweaver 8-- Illustrated Introductory 1 Macromedia Dreamweaver 8 Unit H Collecting Data with HTML Forms.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Dreamweaver MX. 2 Overview of Templates n Forms enable you to collect data from ______. n A form contains ________ such as text fields, radio buttons,
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
1 HTML Forms
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Session 8: Working with Form iNET Academy Open Source Web Development.
HTML Forms a form is a container for input elements on a web page input elements contain data that is sent to the web server for processing.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
HTML Creating Forms on a Web Page. 2 Objectives  Discuss the process of creating a form  Distinguish between data input controls and text input controls.
HTML Forms.
1 HTML Forms
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Tutorial 6 Creating a Web Form
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
Creating and Processing Web Forms
JavaScript, Sixth Edition
FORMS Lesson 10 Unit J Why Forms? Free-form – input that is unstructured and does not limit choices. For example, lets say you ask clients to .
>> More on HTML Forms
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Chapter 5 Introduction to XHTML: Part 2
Introducing Forms.
Unit I: Collecting Data with Forms
Objectives Explore web forms Work with form servers
Web Systems Development (CSC-215)
Forms, cont’d.
Creating Forms on a Web Page
Web Development Using ASP .NET
Introduction to HTML: Forms
Presentation transcript:

HTML 5 and CSS 3, Illustrated Complete Unit J: Creating and Processing Web Forms

Objectives Design a form Create a form Create text fields Customize text fields HTML 5 and CSS 3 – Illustrated Complete

Objectives (continued) Create check boxes Create option buttons Create a drop-down menu Enable form submission HTML 5 and CSS 3 – Illustrated Complete

Designing a Form Useful to plan out a form before coding it To increase usability: Understand what information you need to collect Identify the type of data required for each item Ensure your form is logically organized and includes explanations HTML 5 and CSS 3 – Illustrated Complete

Designing a Form (continued) Fields: form elements in which a user enters or selects data Identify the types of information you need to collect Ask for information in distinct pieces Example: ask for first and last names in two separate fields Clarify what you are likely to need to do with the information Break down into multiple fields only if necessary for processing HTML 5 and CSS 3 – Illustrated Complete

Designing a Form (continued) Create a logical flow Display related fields near each other Display fields in an order users are accustomed to Example: first name, last name, street, city If fields should be completed in a specific order, place them in top-to-bottom order on the form Place fields for questions or information at the bottom of the form HTML 5 and CSS 3 – Illustrated Complete

Designing a Form (continued) Integrate labels and legends Label: element containing descriptive text that is associated with a form element Associate each field with a label to make the significance of the field clear to users Fieldset: group of form elements Place fields that are a logical unit in a fieldset Legend: a descriptive title Add legends to fieldsets to further increase usability of the form HTML 5 and CSS 3 – Illustrated Complete

Creating a Form Web page form contains a series of nested elements <form> element: marks the form content <fieldset> element: contains elements in each section of the form Includes a legend element describing the contents of the fieldset HTML 5 and CSS 3 – Illustrated Complete

Creating a Form (continued) Structure of code for contact form HTML 5 and CSS 3 – Illustrated Complete

Creating a Form (continued) Form outline in browser HTML 5 and CSS 3 – Illustrated Complete

Creating Text Fields input element: used to create many types of input fields in a form Determine which type of input element by setting the type attribute For text box, set type attribute to “text” Other input values create text boxes with specific semantic meanings textarea element: creates a multiline text area Visible size set using rows and cols HTML 5 and CSS 3 – Illustrated Complete

Creating Text Fields (continued) Form including text fields and associated labels HTML 5 and CSS 3 – Illustrated Complete

Customizing Text Fields Labels and fields require styling Good layout makes relationship between fields clear to users Use CSS to: Specify positions of labels and fields Control width of text boxes Limit the number of characters Use attributes to add usability features Example: placeholder attribute HTML 5 and CSS 3 – Illustrated Complete

Customizing Text Fields (continued) Styling and customizing code and resulting form HTML 5 and CSS 3 – Illustrated Complete

Creating Check Boxes Check box: allows user to select one or more predefined choices independent of one another User can click to select or deselect the checkbox Boolean item: box selection is “on” or “off” Defined using the “checkbox” input type Value attribute specifies text to be submitted with the form if a check box is selected HTML 5 and CSS 3 – Illustrated Complete

Creating Check Boxes (continued) Checkbox code and result HTML 5 and CSS 3 – Illustrated Complete

Creating Option Buttons Option button: allows user to select only one of a predefined set of choices Also known as a radio button User can click to select the option button Defined using the “radio” input type Each item in set must have the same value for the name attribute as all other members of the set Use checked attribute for one option to be checked by default HTML 5 and CSS 3 – Illustrated Complete

Creating Option Buttons (continued) Option buttons code and result HTML 5 and CSS 3 – Illustrated Complete

Creating a Drop-Down Menu Drop-down menu: method for creating a list of options from which user can select User can select only one of the values on the list Suitable when data would occupy too much space if listed as option buttons Created using the select element Each of the options is created using an option element nested within the select element HTML 5 and CSS 3 – Illustrated Complete

Creating a Drop-Down Menu (continued) Drop-down menu code and result HTML 5 and CSS 3 – Illustrated Complete

Enabling Form Submission Submit button: Form button that users click to submit their data Created using the submit input type Can use other input types for specialized submit buttons “action” attribute used to specify name and location of script that will accept form data “method” attribute used to indicate how data should be submitted User agents submit the name attribute of a field with associated value HTML 5 and CSS 3 – Illustrated Complete

Enabling Form Submission (continued) Data from a submitted form HTML 5 and CSS 3 – Illustrated Complete

Summary Forms need to be planned and designed before coding Identify types of information to be collected Create logical flow Use labels and legends Form is created using <form> element <fieldset> element groups fields in sections of the form HTML 5 and CSS 3 – Illustrated Complete

Summary (continued) Text boxes are created using “text” input type Text areas are created using textarea elements Layout of text fields can be customized using CSS and attributes Checkboxes allow user to select multiple options and are created using the “checkbox” input type HTML 5 and CSS 3 – Illustrated Complete

Summary (continued) Option buttons and drop-down menus allow a user to select one of several options For option button, use “radio” input type For drop-down menu, use select element and nested option elements A submit button is clicked when user wants to submit data in a form, and is created using the submit input type HTML 5 and CSS 3 – Illustrated Complete