HTML: Basic Tags & Form Tags

Slides:



Advertisements
Similar presentations
Video, audio, embed, iframe, HTML Form
Advertisements

Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
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.
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.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
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.
1 HTML References: A HTML Tutorial: /HTMLPrimer.html
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.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
1 Review of Form Elements. 2 The tag Used in between tags.  Form elements(text control, buttons, etc.. ) goes here. OR  Form elements(text control,
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.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Lesson 5 Introduction to HTML Forms. Lesson 5 Forms A form is an area that can contain form elements. Form elements are elements that allow the user to.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
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.
Chapter 2 Markup Language By : Madam Hazwani binti Rahmat
Web Development Part 2.
HTML Basics (Part-3).
CHAPTER 2 MARKUP LANGUAGE
Client-Side Internet and Web Programming
Making your HTML Page Interactive
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.
Introduction to Web programming
Lists-Tables-Frames Unit - I.
FORMS Explained By: Sarbjit Kaur.
HTML IV (Forms) Robin Burke ECT 270.
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
HTML HTML – Hyper Text Markup Language
Web Programming– UFCFB Lecture 10
HTML/XHTML Forms 18-Sep-18.
النماذج عند الانتهاء من هذا الدرس ستكون قادرا على:
Designing Forms Lesson 10.
Introducing Forms.
1.5 FORMS.
HTML: Basic Tags & Form Tags
Introduction to Web programming
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.
CS3220 Web and Internet Programming HTML Tables and Forms
HTML Forms Internet Technology.
HTML Forms Internet Technology.
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
Kanida Sinmai HTML Form Kanida Sinmai
Making your HTML Page Interactive
Form Design & Validation
Unit 5 Create Forms.
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

HTML: Basic Tags & Form Tags Web Programming

HTML: Syntax Tag starts with <, ends with > 9/30/2019 HTML: Syntax Tag starts with <, ends with > e.g., <html> Tags are not case sensitive e.g., <html> same as <HTML> Most tags enclose the marked up text e.g., <h1>This is a heading</h1> There are some that don’t need an end tag e.g., <p>, <br> Anchor tag is used to “link” documents <a href="http://kiyang.kmu.ac.kr/">Kiduk Yang’s Home Page</a> Blank lines and spaces ignored when interpreting HTML document Web Programming

HTML: A Basic Web Page <html> <head> 9/30/2019 HTML: A Basic Web Page <html> <head> <title>This is a web page</title> </head> <body> This text is displayed on the screen </body> </html> Web Programming

HTML: Basic tags Tags Attributes <p> - paragraph 9/30/2019 HTML: Basic tags Tags <p> - paragraph <b> - bold <i> - italics <h1>, <h2>,…<h6> - headers <a> - anchor <img> - image Many tags have ending tags </b>, </a>, </i>,</h1> Attributes Annotations to tags Provide more detail They can be mandatory <a href=“file.html”> <img src=“picture.gif> Or optional <body bgcolor=“red”> <tr width=“60” align=“right”> Web Programming

HTML Form: Overview What is a HTML form? Why do we need it? 9/30/2019 HTML Form: Overview What is a HTML form? A mechanism to send user input from HTTP client to HTTP server Why do we need it? Because HTTP is Stateless No history of transaction No way for client (user) to share information with server Workarounds HTTP Cookie Active Server Page (ASP), Java Servlet Common Gateway Interface (CGI) HTML Form delivers user input to HTTP server, which relays it to CGI program In other words, HTML form is one of the ways to create dynamic web content Web Programming

Static vs. Dynamic Web Content 9/30/2019 Static vs. Dynamic Web Content Static Web Content Dynamic Web Content Client requests a web page Server returns file HTTP client HTTP server Server passes form input to CGI program Client send form input to server & requests a CGI program CGI Program Server returns the CGI output CGI program processes input, executes its tasks, & generates output (e.g., HTML) HTTP client HTTP server Web Programming

Dynamic/Interactive Web 9/30/2019 Dynamic/Interactive Web 4a. Server passes form input to CGI program 4b. CGI runs & generates output 4c. Server sends CGI output to the browser 3. Browser sends form input to server & requests a CGI program 1. User loads a webpage with a form in a Web browser 2. User fills out a form & hits “SUBMIT” button 5. Brower displays CGI output for the user to see When CGI script “processes” the user input, it may to many things before generating output: send emails to people put data in a file puts data in a database etc. Web Programming

9/30/2019 HTML Form: Elements HTML form is created using <form> </form> tags All form elements are contained within <form> </form> tags <form method=“get”> specifies how data will be passed to server <form action=“CGI program”> specifies which CGI program will be run Types of Form Element Input Element text, password, radio, checkbox, reset, submit Textarea Element multi-rowed text boxes Select Element scrollable, pop-up or pop-down menus Tag Syntax TYPE attribute specifies the type of element Each input value should have a NAME attribute Otherwise, CGI won’t know which input value is associated with which field e.g., <input type=“text” name=“userID”> Web Programming

HTML Form: Input Elements 9/30/2019 HTML Form: Input Elements Text Field Defines a one-line input field that a user can enter text into <form> First name: <input type="text" name="firstname“><br> Last name: <input type="text" name="lastname“> </form> Password Field Defines a password field that will be masked (data won’t display) <form> Password: <input type=“password" name=“pw”> </form> Radio Field Defines a radio button, where user can make only one selection (from radio buttons with the same name) VALUE attribute can be used to pass data specified by its value to the server <form> <input type="radio" name="sex" value="male”> Male<br> <input type="radio" name="sex" value="female”> Female </form> Web Programming

HTML Form: Input Elements 9/30/2019 HTML Form: Input Elements Checkbox Field Defines a checkbox, where user can make multiple selections (from checkboxes with the same name) <form> <input type="checkbox" name="vehicle" value="Bike”> I have a bike<br> <input type="checkbox" name="vehicle" value="Car”> I have a car  </form> Submit Field Defines a submit button that will send form data to server VALUE attribute determines the text shown on the button <form action=“username.cgi” method=“get”> Username: <input type="text" name="user”> <input type="submit" value="Submit”> </form> Reset Field Clears all form fields (usually used along with SUBMIT) <input type="submit" value="Submit”> <input type=“reset" value=“Clear”> Web Programming

HTML Form: Other Elements 9/30/2019 HTML Form: Other Elements Select Field Creates a dropdown list, from which user can make selections <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> Textarea Field Creates a multi-line text input box ROWS & COLS attributes determines the size of the text box Text between <textarea> and </textarea> will show up in the box. <textarea name=“comment” rows=“10” cols=“30”> The cat was playing in the garden. </textarea> Web Programming