CS3220 Web and Internet Programming HTML Tables and Forms

Slides:



Advertisements
Similar presentations
Tables Tables provide a means of organising the layout of data
Advertisements

Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
Svetlin Nakov Telerik Corporation
Chapter 6 Basic forms 1. Forms and query string 2 form : a group of user input (UI) controls that accepts information from the user and sends the information.
Technologies for web publishing Ing. Václav Freylich Lecture 4.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
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.
HTML: Tables and Forms. Objectives Use tables to structure a webpage Use forms to collect user input –Method:Get, Post –Input –Select –Textarea.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Session 2 Tables and forms in HTML Adapted by Sophie Peter from original document by Charlie Foulkes.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
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.
Advance Database Management Systems Lab no. 5 PHP Web Pages.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Svetlin Nakov Telerik Corporation
Tables and Forms HTML5 Tables and Forms. Table Overview table element ( ) Attributes: align (left, right, center), bgcolor, border, cellpadding, cellspacing,
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 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.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
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.
XHTML1-1 Extensible HyperText Markup Language (XHTML) Part 2 Xingquan (Hill) Zhu
Svetlin Nakov Telerik Corporation
TJ 3043 – Web Application Development HTML Form. 2.0 Forms A form is the usual way to communicate information from a Web browser to a server HTML has.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
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
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.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced 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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Introduction to Web Site Development Department of Computer Science California State University, Los Angeles Lecture 8: Forms and Controls.
TNPW1 Ing. Jiří Štěpánek.  ordered list  (list item)  unordered list  (list item)
XHTML Forms.
Tutorial 6 Working with Web Forms
Advanced HTML Tags:.
Client-Side Internet and Web Programming
HTML Forms Pat Morin COMP 2405.
Chapter 8 and 9.
Lists-Tables-Frames Unit - I.
HTML IV (Forms) Robin Burke ECT 270.
ITE 115 Creating Web Page Forms
HTML Tables CS 1150 Spring 2017.
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
Tables Tables provide a means of organising the layout of data
ARUSHA TECHNICAL COLLEGE WEB DESIGN(html forms)
List, Tables,Frame and Forms
Designing Forms Lesson 10.
Introducing Forms.
Web Development & Design Foundations with H T M L 5
Forms, cont’d.
CNIT 131 HTML5 - Forms.
CS3220 Web and Internet Programming HTML Tables and Forms
The Internet 10/27/11 XHTML Forms
CS205 Tables & Forms © 2012 D. J. Foreman.
Web Forms.
Presentation transcript:

CS3220 Web and Internet Programming HTML Tables and Forms Chengyu Sun California State University, Los Angeles

A Simple Table … Item Quantity Price Lamp 1 $15 Book 2 $10

… A Simple Table <table>, <tr>, <th>, and <td> <th>Item</th><th>Quantity</th><th>Price</th> </tr> <td>Lamp</td><td>1</td><td>$15</td> <td>Book</td><td>2</td><td>$10</td> </table>

<table> Attributes Almost all <table> attributes, including the following, are deprecated in HTML5 border: border width in pixels cellpadding: space between cell content and cell border in pixels cellspacing: space between cell in pixels

Other Table Tags The following elements, if specified, must appear in order and no more than once inside a table <caption> <thead>: group one or more rows into a table header <tbody>: group one or more rows into a table body <tfoot>: group one or more rows into a table footer

Merged Cells rowspan=2 colspan=3 colspan and rowspan are attributes of <td> and <th>

Nested Tables Simply put <table> inside a <td>

A Simple Form <form action="https://www.google.com/search" method="get"> Google: <input type="text" name="q" value="" /> <input type="submit" name="search" value="Search" /> </form>

Form Submission The browser takes the data entered in the form and send it to a server-side program to be processed

Request Parameters Parameter name, e.g. q and search Query String https://www.google.com/search?q=java&search=Search Request Parameters Parameter name, e.g. q and search Parameter value, e.g. java and Search

Attributes of <form> action: the URL of the server-side program that will process the data submitted from the form method: the “method” of the HTTP request used to send the data get (or GET) post (or POST)

Attributes of <input> type: type of the form control, e.g. text boxes, radio buttons, and check boxes name: name of the request parameter value: value of the request parameter

Type of <input> Input fields Buttons text password checkbox radio file hidden Buttons submit reset image And many more added in HTML5. See https://www.w3.org/TR/html5/forms.html#attr-input-type

Additional Attributes of <input> placeholder size, minlength, maxlength required checked disabled

About Boolean Attributes in HTML5 False: the absence of the attribute True: the presence of the attribute, and the attribute value must be either empty string or the attribute name <input name=“a” type=“checkbox” checked> √ <input name=“a” type=“checkbox” checked=“”> √ <input name=“a” type=“checkbox” checked=“checked”> √ <input name=“a” type=“checkbox” checked=“true”> × <input name=“a” type=“checkbox” checked=“yes”> ×

About Checkboxes and Radio Buttons Multiple <input> elements have the same name but different values Only the checked elements are submitted as requested parameters to the server

A General-Purposed <button> <button>Click Me!</button> The type attribute of <button> submit: submit the form (default) reset: reset the form button: does nothing

Text Area with <textarea> Basically a multi-line version of <input type=“text” /> Attributes rows: number of rows cols: number of columns

<select> and <option> Create lists and dropdown lists Name of <select> is submitted as the request parameter name Value of <option> is submitted as the request parameter value <select name="grade"> <option value="A">Great</option> <option value="B">Good</option> <option value="C">Passed</option> <option value=“NC">No Credit</option> </select>

Attributes of <select> size: number of items to be displayed 1 (default)  dropdown list More than one  list multiple: whether more than one option can be selected

More about <option> Omit value attribute <option>A</option> <option selected>B</option> <optgroup label=“Passing Grades”> <option>B</option> <option>C</option> </optgroup> Default selection Option Group

Using <label> Clicking on a <label> element has the same effect as clicking on the form control the label is “for” <label for=“f1”>Name:</label> <input id=“f1” type=“text” name=“name” /> <label>CIN: <input type=“text” name=“cin” /></label> <label for=“f2”>Vegetarian:</label> <input id=“f2” type=“checkbox” name=“vegetarian” />

<fieldset> and <legend> Group form controls together (like grouping <option> with <optgroup>)