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

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.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
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.
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.
+ 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.
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.
1 Committed to Shaping the Next Generation of IT Experts. 03: Links and Forms HTML.
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.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
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
Making your HTML Page Interactive
Web Forms.
PHP: Forms FdSc Module 109 Server side scripting and Database design
How to Write Web Forms By Mimi Opkins.
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
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
CNIT 131 HTML5 - Forms.
HTML Forms Internet Technology.
HTML Forms Internet Technology.
Principles of Web Design 5th Edition
HTML HyperText Markup Language
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
Working with ‘checked’ items Checkboxes and Radio buttons
HTML Extras.
Kanida Sinmai HTML Form Kanida Sinmai
Web Forms.
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 <form> <input type="radio" name="sex" value="male"> Male <br > <input type="radio" name="sex" value="female">Female </form> 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 <form> 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> </form> 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 <form> <select name="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="fiat">Fiat</option> <option value="audi">Audi</option> </select> </form> 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 area 10 rows and 30 columns

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

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>