Tables Tables provide a means of organising the layout of data

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML Programming the World Wide Web Fourth edition.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,
4. Internet Programming ENG224 INFORMATION TECHNOLOGY – Part I
Chapter 3 – Web Design Tables & Page Layout
Introduction to HTML Part 2
Svetlin Nakov Telerik Corporation
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Creating Tables in a Web Site
Frames.
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Images, Tables, lists, blocks, layout, forms, iframes
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
HTML and XHTML Controlling the Display Of Web Content.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
Tutorial 6 Working with Web Forms
Computing Concepts Advanced HTML: Tables and Forms.
USER INTERACTIONS: 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.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
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.
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.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
HTML II. Factors to consider in designing a website. Organizing your files. HTML Tables. Unordered Lists. Ordered Lists. HTML Forms. Learning Objectives.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Introduction to HTML Part 3 Chapter 2. Learning Outcomes Identify how to design frames. Explain frames’ attributes. Describe the method on designing forms.
76 © 1998, 1999, 2000 David T. Gray, Howard Duncan, Jane Kernan Frames When displaying information in a browser, it is sometimes useful to divide the display.
HTML : Forms, Frames Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
XHTML1-1 Extensible HyperText Markup Language (XHTML) Part 2 Xingquan (Hill) Zhu
ITCS373: Internet Technology Lecture 5: More HTML.
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
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
HTML(Hyper Text Markup Language) ByNaveen. Introduction HTML or Hyper Text Markup Language is the standard markup language Its used to create the web.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
HTML Forms.
HTML Forms. A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
1 R3 R1 R5 R4 R6 R2 B B A A Looking at the Code Under the View menu Select Source.
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.
HTML Comprehensive Concepts and Techniques Second Edition Creating Frames on a Web Page.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
CS3220 Web and Internet Programming HTML Tables and 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.
The Web Warrior Guide to Web Design Technologies
Chapter 5 Introduction to XHTML: Part 2
Web Programming– UFCFB Lecture 10
Tables Tables provide a means of organising the layout of data
Chapter 5 - Introduction to XHTML: Part 2
Unit I: Collecting Data with Forms
CS3220 Web and Internet Programming HTML Tables and Forms
In this session, you will learn to:
Presentation transcript:

Tables Tables provide a means of organising the layout of data A table is divided into rows and columns: these specify the cells of the table Cells can contain text, images, links, other tables... Tables can also be used for organising the layout of the web page itself. BSc CM0133 Internet Computing

Tables <table border="1"> <tr> <th>Name</th> <th>Course</th> <th>Year</th> </tr> <td>A B Morgan</td> <td>Fishing</td> <td>5</td> <td>D P Jones</td> <td>Sailing</td> <td>8</td> </table> <table> main element <tr> table row <th> table header <td> table data BSc CM0133 Internet Computing

Tables <table border="1"> <tr> <th>Name</th> <td>A B Morgan</td> <td>D P Jones</td> </tr> <th>Course</th> <td>Fishing</td> <td>Sailing</td> <th>Year</th> <td>8</td> <td>5</td> </table> <table> main element <tr> table row <th> table header <td> table data BSc CM0133 Internet Computing

<table border="1"> <tr> <th colspan="2">Name</th> <th>Course</th> <th>Year</th> </tr> <td>A B</td> <td>Morgan</td> <td rowspan="2">Fishing</td> <td>5</td> <td>D J</td> <td>Jones</td> <td>Sailing</td> <td>8</td> </table> Rows and Columns Cells can span multiple columns and multiple rows with the colspan and rowspan attributes BSc CM0133 Internet Computing

The align and width attributes The align attribute determines the position of the text within a cell The width attribute determines the width of the row relative to the table <table border="1" align="center"> <tr> <th colspan="2" width="60%">Name</th> <th rowspan="2">Course</th> <th rowspan="2">Year</th> </tr> <th>Last</th> <th>Init.</th> <td>Morgan</td> <td>AB</td> <td>Fishing</td> <td align="center">5</td> <!– etc --> BSc CM0133 Internet Computing

Table attributes Table attributes align alignment relative to the page width in pixels or percentage of page width border - width of border (pixels) cellspacing separation between cells (pixels) cellpadding - space around data inside cell (pixels) bgcolor - background colour (inside cells) Furthermore The <caption> element puts a title above the table BSc CM0133 Internet Computing

Table attributes <table border="3" align="center" cellspacing="6" cellpadding="6" bgcolor="cyan"> <caption> <h2>Course Data</h2> </caption> <tr> <th>Name</th> <th>Course</th> <th>Year</th> </tr> <td>A B Morgan</td> <td>Fishing</td> <td>5</td> <!– etc --> BSc CM0133 Internet Computing

</body> <table border="0" cellspacing="10"> <tr> <td> <img src="cat.gif" alt="cat"> <ul> <li>cats</li> <li>dogs</li> <li>butterflies</li> </ul> </td> This piece of text illustrates the idea of placing two columns of information in a web page... Note also that there is no border in this table. </tr> </table> Page formatting Tables can be used to organise the layout of the web page itself BSc CM0133 Internet Computing

Frames and Framesets A frameset partitions a web browser window so that multiple web documents can be displayed simultaneously. Example application: To maintain a permanently visible directory of links within your site, while also displaying one or more selected documents from the site. otherwise the directory of links must appear on every page, and this scrolls up with the page Note: framesets can cause problems for bookmarking and for "screen readers" (for visually-impaired users) BSc CM0133 Internet Computing

Framesets <html> <head><title>Frames 1</title></head> <frameset cols="140,*"> <frame name="navF" src="navigation.html"> <frame name="mainF" src="intro.html"> </frameset> </html> The frameset element replaces the body element frameset has attributes cols or rows, defined in terms of pixels, percentage(%) or unspecified (*) this splits the window into two or more columns or rows BSc CM0133 Internet Computing

Frame attributes <frameset cols="140,*"> <frame name="navF" src="navigation.html"> <frame name="mainF" src="intro.html"> </frameset> The name attribute uniquely identifies the frame. It may be used as the target in an anchor (<a>) element The src attribute specifies the web page to be placed in the frame initially (it may subsequently be overwritten) The scrolling attribute ("auto", "yes", "no") specifies whether the frame is to have scroll bars The frameborder attribute ("0", "1") specifies whether the frame is to have a border BSc CM0133 Internet Computing

navigation.html The anchor tag has a target attribute takes the name of the frame used to display the information All anchors below are targeted to the "mainF" frame <html><head><title>Navigation Bar</title></head> <body><center> <a href="course.html" target="mainF">HTML Course</a><br><br> <a href="paragraph.html" target="mainF">Paragraphs</a><br> <a href="headings.html" target="mainF">Headings</a><br> <a href="ulists.html" target="mainF">Unordered lists</a><br> <a href="olists.html" target="mainF">Ordered lists</a><br> <a href="nlists.html" target="mainF">Nested lists</a><br> <a href="intro.html" target="mainF">Home</a><br> </center></body> </html> BSc CM0133 Internet Computing

intro.html A simple document which is initially placed in the "mainF" frame This is replaced when a user clicks on a link in the "navF" frame <html> <head><title>Internet Computing</title></head> <body> <h2>Welcome to the HTML Course</h2> <p> <h4>Please select the subject of...</h4> </p> </body> </html> BSc CM0133 Internet Computing

Nested framesets <html> <head><title>Frames 2</title></head> <frameset cols="140,*"> <frame name="navF" src="navigation.html"> <frameset rows="30%,70%"> <frame name="upperF" src="intro.html"> <frame name="lowerF" src="course.html"> </frameset> </html> BSc CM0133 Internet Computing

Noframes Some browsers cannot process frames. Alternative content should be provided using the noframes element <html> <head><title>Frames 1</title></head> <frameset cols="140,*"> <frame name="navF" src="navigation.html"> <frame name="mainF" src="intro.html"> </frameset> <noframes> <body> Something here for browsers not supporting frames </body> </noframes> </html> BSc CM0133 Internet Computing

Forms Forms are user interfaces for data input Main application: to provide user input for programs and databases located on a web server local (client-side) scripts associated with the form Server-based programs may return data to the client as a web page Client-side scripts can read input data To validate the data, prior to sending to server To use in local processing which may output web page content that is displayed on the client BSc CM0133 Internet Computing

Example applications Questionnaires to provide feedback on a web site e-commerce, to enter name, address, details of purchase and credit-card number request brochures from a company make a booking for holiday, cinema etc. buy a book, cd, etc obtain a map giving directions to a shop Run a database query and receive results (an important part of e-commerce) BSc CM0133 Internet Computing

Input types text checkbox radio (buttons) select (options) textarea password button submit reset hidden file image BSc CM0133 Internet Computing

The method and action attributes The method attribute specifies the way that form data is sent to the server program GET appends the data to the URL POST sends the data separately The action attribute specifies a server program (e.g. a perl program .pl extension) that processes the form data Can also send an email: action=“mailto:D.P.Cosker@..” <body> <form method="POST" action="comments.pl"> <h2>Tell us what you think</h2> <!-- etc --> </form> </body> BSc CM0133 Internet Computing

The input element: type="text" The type attribute specifies the type of user input The name attribute gives an identifier to the input data The size attribute specifies the length of the input field The value attribute specifies an initial value for the text (optional) <form method="POST" action="comments.pl"> <h2>Tell us what you think</h2> Name <input name="name" type="text" size="20"><br> Address <input name="address" type="text" size="30"> </form> BSc CM0133 Internet Computing

The input element:type="checkbox" The name attribute is used to define a set of checkboxes The value attribute identifies the individual checkbox If the checked attribute is set the box is initially checked How did you hear about this web site?<br> A friend <input type="checkbox" name="howdid" value="friend"><br> Search engine <input type="checkbox" name="howdid" value="engine"><br> <!– etc --> BSc CM0133 Internet Computing

The input element: type="radio" Radio buttons are similar to checkboxes, but only one can be selected To select a button by default, use the checked attribute (for one button only) How did you hear about this web site?<br> A friend <input type="radio" name="howdid" value="friend"><br> Search engine <input type="radio" name="howdid" value="engine"><br> <!– etc --> BSc CM0133 Internet Computing

The input element: type="button" The name attribute uniquely identifies a button The value attribute gives a label to the button Actions can be associated with buttons- more later Do you want to receive any further information:<br> <input type="button" name="yes" value=" Yes "> <input type="button" name="no" value=" No "><br> BSc CM0133 Internet Computing

The input element: type="submit/reset" clicking this button sends the form data to the program (URL) specified in the action attribute of the form type="reset" clicking this button clears all data entered so far Thank you<br> <input type="submit" name="send" value="Send"> <input type="reset" name="clear" value="Clear"><br> BSc CM0133 Internet Computing

The input element: type="password/file/hidden" similar to type="text" except that the input is echoed with asterisks (so not visible) type="file" provides a file dialogue box to specify a file that is sent to the server type="hidden" similar to text input, but the value attribute is used to specify data that is to be sent to the server. Nothing appears on the screen. The data might be set by a server program to keep track of the details of a particular transaction. BSc CM0133 Internet Computing

The textarea element Used for multi-line text input The size of the input area is specified with the cols and rows attributes Any text placed inside the element appears in the input area (this can be deleted). Please write your comments:<br> <textarea name="comments" rows="5" cols="20"> put text here </textarea> BSc CM0133 Internet Computing

The select element The select element provides a menu of options An option can be selected by default using the selected attribute (otherwise the first in the list is initially selected) How do you rate this site?<br> <select name="rating"> <option>Good <option selected>Bad <option>Ugly </select> BSc CM0133 Internet Computing