Making your HTML Page Interactive

Slides:



Advertisements
Similar presentations
>> Introduction to HTML: Forms. Introduction to HTML 5 Important HTML Tags HTML tags and attributes Images Hyperlinks Lists –{ordered | unordered | definition}
Advertisements

Technologies for web publishing Ing. Václav Freylich Lecture 4.
Forms cs105. More Interactive web-pages So far what we have seen was to present the information. (Ex: tables. Lists,….). But it is not enough. We want.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),
4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.
HTML Forms What is a form.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
Forms and Form Controls Chapter What is a Form?
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
FORMS. Forms are used to receive information from the web surfer, such as: their name, address, credit card, etc. Form fields are objects that allow.
Introduction To HTML Form Inputs Written By George Gimian.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Page Design Forms! Website Design. Objectives What forms can do The Attributes of the form tag Using Textboxes Textareas Checkboxes Radio buttons.
+ 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.
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.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
HTML FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Chapter 2 Markup Language By : Madam Hazwani binti Rahmat
Tutorial 6 Working with Web Forms
Web Development Part 2.
HTML Basics (Part-3).
CHAPTER 2 MARKUP LANGUAGE
Web Forms.
Client-Side Internet and Web Programming
Web Forms.
PHP: Forms FdSc Module 109 Server side scripting and Database design
Introduction to HTML.
CS3220 Web and Internet Programming HTML Tables and Forms
Forms Web Design Ms. Olifer.
FORMS IN HTML.
>> More on HTML Forms
Introduction to Web programming
Lists-Tables-Frames Unit - I.
HTML HTML – Hyper Text Markup Language
Lesson 8 Week 8 Designing Forms
HTML/XHTML Forms 18-Sep-18.
النماذج عند الانتهاء من هذا الدرس ستكون قادرا على:
Designing Forms Lesson 10.
Introducing Forms.
HTML: Basic Tags & Form Tags
Introduction to Web programming
Creating Form Elements
Creating Form Elements
Web Development & Design Foundations with H T M L 5
CS3220 Web and Internet Programming HTML Tables and Forms
HTML Forms Internet Technology.
HTML Forms Internet Technology.
Creating Forms on a Web Page
Intro to Forms HTML forms are used to gather information from end-users. A form can contain elements like radio-buttons, text fields, checkboxes, submit.
HTML Forms 18-Apr-19.
Intro to Forms HTML forms are used to gather information from end-users. A form can contain elements like radio-buttons, text fields, checkboxes, submit.
© Hugh McCabe 2000 Web Authoring Lecture 8
Introduction to HTML: Forms
Kanida Sinmai HTML Form Kanida Sinmai
Web Forms.
Making your HTML Page Interactive
Form Design & Validation
Unit 5 Create Forms.
HTML: Basic Tags & Form Tags
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Making your HTML Page Interactive Forms Making your HTML Page Interactive

Form Tag First, tell the browser you are creating a Form <form></form> There are other attributes you can add, but we’ll just start with the basics.

Your code should look like this: <html> <head> <title>learning forms</title> </head> <body> <form> </form> </body> </html>

Types of input You must define what type of input you are requiring your viewer to do Text Radio Check Simple Drop Down Boxes Text Area

Syntax First define the input type Next name the input The last step will depend on which type of input you are using For text, it will be size (how large to make the box to answer) For radio and checkboxes, it will be value (what value the button has)

Text Input Text input is used to collect single line of text from the user like name, email address etc. It is the most commonly used input type. A text input item can be defined like this: <INPUT TYPE="TEXT“> TYPE="TEXT" attribute tells the browser that a single line text input box should be created. NAME="FirstName"  defines the name of the field. This name will be used at the server side to identify this input item. <input type=“text” name=“First Name”> SIZE="lengthChars“ is the length of the input text box, in number of characters. <input type=“text” name=“First Name” size=“30”>

Let’s put it in a table <table width=“100%”> <tr> <td> <input type=“text” name=“First Name” size=“30”> </td> </tr> What would the next td probably be?

Text Input <form> First name: <input type="text" name="firstname" size=20> <br /> Last name: <input type="text" name="lastname" size=30> </form> Example 1 Notice that we put what the field should contain before defining the box after it.

Radio Buttons You will use these when you only want your viewer to be able to make one choice. <INPUT TYPE="RADIO" NAME="name" VALUE="valueOfThisItem"> Buttons in the same set will have the same name. For example, if you are asking someone to rate an item as excellent, good, fair, poor, the name of your buttons could be RATE. Here’s an example: <INPUT TYPE="RADIO" NAME="rating" VALUE="excellent">Excellent !!! <BR>

Radio Buttons <input type="radio" name="sex" value="male"> Male <br > <input type="radio" name="sex" value="female">Female Example 2

Checkboxes Checkboxes are used when you want the user to select one or more options of a limited number of choices. For example, if you wanted someone to choose which items they had previously bought from your company. The name value will be the same for each checkbox: <INPUT TYPE="CHECKBOX" NAME=“product" VALUE="checkboxValue"> Here’s an example: <INPUT TYPE=“checkbox" NAME=“product" VALUE=“MP3">MP3 player

Checkboxes I have a bike: <input type="checkbox" name="vehicle" value="Bike">Bike <br> I have a car: <input type="checkbox" name="vehicle" value="Car">Car <br> I have an airplane: <input type="checkbox" name="vehicle" value="Airplane">Airplane<br> Example 3

Syntax for Drop Downs A little different than the other inputs. You use select and option value.

Drop Downs A drop down is a selectable list. This time, you don’t have to use the <input form> tag. Just use <select name=“category”>. Then define each choice in the drop down use the <option value=“_____”>NAME </option> for each choice in the drop down Finally, use the ending tag </select>.

Simple Drop Down Boxes <select name="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="fiat">Fiat</option> <option value="audi">Audi</option> </select> Example 4

Syntax for Textarea Different still than the other input groups. Textarea as a paired code is all you need. <textarea></textarea> You only define values or name it if you want to.

Text Area A user can write text in the text-area. In a text-area you can write an unlimited number of characters on multiple lines. <textarea rows=“10” cols=“30”> </textarea> This would give you 10 rows with about 30 characters each for a viewer to write comments.

Text Areas <textarea rows=“10” cols=“30”> </textarea> Example 5

Product Registration Page <table width=“50%”> <h1>product registration</h1> <Form name =Request> <table width="50%" border="0"> <tr><td>First Name</td><td><input width=“30”>Last Name<input size=30></tr> <tr><td>Address<td> <input size=70></tr> <tr><td>City<td><input size=30></tr> <tr><td>State<td><input size=2></tr> <tr><td>Zip<td><input size=5></tr></table> <br>

Product Registration Radio Button <td>What item did you purchase?<br> <input type=“radio” value=“purchases” name=“CD>CD Player<br> <input type=“radio” value=“purchases” name=“tv>Television<br> <input type=“radio” value=“purchases” name=“phone”>Telephone<br> <input type=“radio” value=“purchases” name=“cell”>Cell Phone<br> <input type=“radio” value=“purchases” name=“computer”>Computer<br> </tr>

Product Registration Dropdown <select name=“products” Option values are warranty, accessories, hands free and nothing extra, please End with </select>

Text area 10 rows and 30 columns

Next Lesson In the next lesson, we will learn to create buttons to submit or send to an email address.

Adding a Submit Button sent to email <form method="post" action="mailto:youremail@email.com"> <br> <input type="submit" value="Send"> </form>

Adding a submit button <form method="get" action="http://address you want to link to"><input type="submit" value="click here"></form> This is what it would look like: Add color to your button: <FORM METHOD="get" ACTION="http://www.lissaexplains.com"> <INPUT TITLE="submit" TYPE="submit" STYLE="background:#00ff00" VALUE="Click Here"></FORM>

Your Turn Creating a simple form for a guestbook. Please sign my guestbook. Use the input type element. Input types available: Textbox For a larger area textbox for comments, etc. Radio Buttons Checkboxes Drop Down Boxes Buttons to submit answers or reset form You will create a link in your All About me page for visitors to sign your guestbook

Your turn, AGAIN Create an information form for the White Plains Alumni Association to use in planning future class reunions.