Chapter 5 Introduction to XHTML: Part 2

Slides:



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

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Introduction to HTML Part 2
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Session 3 Intermediate HTML Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Chapter 4 – Intermediate HTML 4 Outline 4.1 Unordered Lists 4.2 Nested and Ordered Lists 4.3 Basic HTML Tables 4.4 Intermediate HTML Tables and Formatting.
HTML and XHTML Controlling the Display Of Web Content.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
1 Introduction to XHTML: Part 2 Outline Introduction Basic XHTML Tables Intermediate XHTML Tables and Formatting Basic XHTML Forms More Complex XHTML Forms.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Using HTML Tables.
 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.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
1 XHTML Tables A table is a matrix of cells, for displaying content in rows and columns The cells can include almost any element Some cells display row.
Chapter 5 Working with Tables. Agenda Add a Table Assign a Table Border Adjust Cell Padding and Spacing Adjust Cell Width and Height Add Column Labels.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… HTML Lists, Tables and Forms v2.0.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
Web Development University of Khartoum. Web Development Web Programming Web Design University of Khartoum.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
1 HTML Advanced Features Dr. Awad Khalil Computer Science Department AUC.
>> Introduction to HTML: Tables. HTML is used to give websites structure 5 Basic Tags Element = Start-Tag+Content+End-Tag Heading Tags [h1-h6] Paragraph.
 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.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 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.
XHTML1-1 Extensible HyperText Markup Language (XHTML) Part 2 Xingquan (Hill) Zhu
1 Week Four– Advance HTML 2 Dr. Fadi Safieddine. 2 Lecture Content Basic HTML Tables Using based Feedback form Creating and Using Image Maps Nested.
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.
Svetlin Nakov Telerik Corporation
TABLES 1. In this chapter you will learn that tables have many uses in HTML. Objectives: Upon completing this section, you should be able to: 1. Insert.
 2003 Prentice Hall, Inc. All rights reserved. Introduction to HTML: Tables Outline 1 Introduction 2 Basic HTML Tables 3 Intermediate HTML Tables and.
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.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
LINKING WEBPAGES USING HTML HYPERLINKS. Hyperlinks are text strings or images on a webpage which when clicked on, links to another section in the same.
1 Chapter 2 - Introduction to HTML: Part 2 Outline Basic HTML Tables Intermediate HTML Tables and FormattingBasic HTML Forms More Complex HTML Forms Internal.
Introduction to XHTML/HTML5 (part 2) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web How To Program (multiple versions) 1.
Introduction to XHTML/HTML5 (part 2)
Designing a Web Page with Tables
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
>> HTML: Tables.
CS3220 Web and Internet Programming HTML Tables and Forms
LAB Work 02 MBA 61062: E-Commerce
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
Using HTML Tables SWBAT: - create tables using HTML
1 Introduction to XHTML.
HTML Tables & Frames Internet Technology.
CS3220 Web and Internet Programming HTML Tables and Forms
Introduction to XHTML Cont:.
Introduction to HTML.
The Internet 10/27/11 XHTML Forms
In this session, you will learn to:
Introduction to HTML: Forms
IS333: MULTI-TIER APPLICATION DEVELOPMENT
HTML Tables & Frames Internet Technology.
Presentation transcript:

Chapter 5 Introduction to XHTML: Part 2 Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg Spring 2009 Yanjun Li CSRU2350

Objectives Tables Forms Frames Present information Collect information from visitor Frames Display multiple documents in the browser Spring 2009 Yanjun Li CSRU2350

Basic XHTML Tables (1) Organize data into rows and columns table element with useful attributes: border : specifies the table’s border width in pixels. No border: border=“0” width : specifies the width of table. In percentage or in pixels. summary : describes the table’s contents Example: <table border=“1” width=“40%”, summary=“example of table”> </table> Spring 2009 Yanjun Li CSRU2350

Basic XHTML Tables (2) caption element: like the title of the table describes the table’s content and helps text-based browsers interpret table data Head section (header cell, defined with a thead element) Contains header information such as column names Foot section (defined with a tfoot element) Spring 2009 Yanjun Li CSRU2350

Basic XHTML Tables (3) For head and foot sections : tr element (defines an individual table row) th element (defines the columns in the head/foot sections) Most browsers center and display text formatted by th elements in bold. Spring 2009 Yanjun Li CSRU2350

Basic XHTML Tables (4) Table body (defined with a tbody element) For body sections : tr element (defines an individual table row) Each row has a tr element td element (Data cells ) Empty data cell: <td>   </td> Spring 2009 Yanjun Li CSRU2350

table.html (1 of 3) Spring 2009 Yanjun Li CSRU2350

table.html (2 of 3) Spring 2009 Yanjun Li CSRU2350

table.html (3 of 3) Spring 2009 Yanjun Li CSRU2350

Tags inside a Table Write html tags inside a table cell: Example: <td> <p>This is a paragraph.</p> <p>This is another paragraph. </p> </td> Spring 2009 Yanjun Li CSRU2350

Cell Padding Attribute of table element: cellpadding=“10” create more white space between the cell content and its borders. Spring 2009 Yanjun Li CSRU2350

Cell Spacing Attribute of table element: cellspacing=“10” increase the distance between the cells. Spring 2009 Yanjun Li CSRU2350

Background of Table/Cell Attribute of table or cell element: bgcolor=“red” Background color of a table. background=“yellow.jpg” Background image of a table Spring 2009 Yanjun Li CSRU2350

Layered Tables Example: Art Frame <table> <tbody> <tr> <td> <table> …… </table> </td> </tr> </tbody> </table> Spring 2009 Yanjun Li CSRU2350

Size of Table/Cell For table as well as td, height and width attributes can be added to set the size. Example: <table width=“300” height=“100”>… </table> <td width=“50” height=“50”> </td> Spring 2009 Yanjun Li CSRU2350

Absolute vs. Relative Size If the width is specified as an absolute size, if user’s monitors are 640x480 pixels, large table will not be shown fully on the screen. Relative Size: <table width=“50%” height=“100”> <td width=“60%”> <td width=“40%”> Spring 2009 Yanjun Li CSRU2350

Intermediate XHTML Tables and Formatting (1) Element colgroup : groups and formats columns Element col has the following attributes: align: determines the alignment of text in the column span: determines how many columns the col element formats valign: aligns data vertically One of the four values: “top”, “middle”, “bottom”, “baseline” Spring 2009 Yanjun Li CSRU2350

Intermediate XHTML Tables and Formatting (2) Element tr, th, td have attributes align valign rowspan and colspan specify the number of rows or columns occupied by a cell Spring 2009 Yanjun Li CSRU2350

table2.html (1 of 4) Spring 2009 Yanjun Li CSRU2350

table2.html (2 of 4) Spring 2009 Yanjun Li CSRU2350

table2.html (3 of 4) Spring 2009 Yanjun Li CSRU2350

Organize Webpage with Table Use table to set the layout of a webpage Set table attribute border =“0” Example: two-column page Spring 2009 Yanjun Li CSRU2350

Forms Data is collected on the Internet and processed by a program on a Web server. Form : collect data from a user and send to a Web server. Form performs the client-side functionality. The program on the Web server performs the server-side functionality. Spring 2009 Yanjun Li CSRU2350

Basic XHTML Forms (1) Forms can contain visual and non-visual components. Visual components : graphical user interface components. Non-visual components (hidden inputs): store useful data, such as how the program on the Web server processes the coming data. Spring 2009 Yanjun Li CSRU2350

Basic XHTML Forms (2) Element form Example: Attribute method Specifies how the form’s data is sent to Web server method = “post” Appends form data to the browser request method = “get” Appends form data directly to the end of the URL Attribute action Specifies the URL of a script on the Web server Example: <form method = "post" action = "/cgi-bin/formmail"> : </form> Spring 2009 Yanjun Li CSRU2350

Basic XHTML Forms (3) Element input: specifies data to provide to the script that processes the form Attribute type indicates the type of the input element. The default value is "text“, Other values are “hidden”, “submit”, “reset”. Attribute name defines a unique name for the input element. Attribute value defines the default value of the element. Attribute size, maxlength defines the size of the input element and the maximum number of characters allowed in a text field. Element label : associate the label with a control. Spring 2009 Yanjun Li CSRU2350

form.html (1 of 3) Spring 2009 Yanjun Li CSRU2350

form.html (2 of 3) Spring 2009 Yanjun Li CSRU2350

form.html (3 of 3) Spring 2009 Yanjun Li CSRU2350

More Complex XHTML Forms (1) Element textarea inserts a multiline text box (text area) Attribute rows specifies the number of rows Attribute cols specifies the number columns Element input with password, size type Inserts a password box with the specified size Element input with checkbox type Enable users to select from a set of options Checkboxes that belong to a group are assigned the same name. Multiple checkboxes could be checked in one group. checked =“checked” indicates that the input element should be checked when it first loads. Spring 2009 Yanjun Li CSRU2350

form2.html (1 of 4) Spring 2009 Yanjun Li CSRU2350

form2.html (2 of 4) Spring 2009 Yanjun Li CSRU2350

form2.html (3 of 4) Spring 2009 Yanjun Li CSRU2350

form2.html (4 of 4) Spring 2009 Yanjun Li CSRU2350

Spring 2009 Yanjun Li CSRU2350

More Complex XHTML Forms (2) Element input with radio type Enable users to select one from a set of options The radio buttons in a group are assigned the same name. Only one radio button could be selected in one group. checked =“checked” indicates that the input element should be checked when it first loads. Spring 2009 Yanjun Li CSRU2350

More Complex XHTML Forms (3) Element select provides a drop-down list of items Attribute disabled when set, it disables the drop-down list : disabled=“disabled” Attribute multiple when set, it specifies that multiple items can be selected at a time : multiple=“multiple” Attribute name defines a unique name for the drop-down list Attribute size defines the number of visible items in the drop-down list Element option adds items to the drop-down list Attribute selected specifies which item initially is displayed as the selected item Spring 2009 Yanjun Li CSRU2350

form3.html (1 of 6) Spring 2009 Yanjun Li CSRU2350

form3.html (2 of 6) Spring 2009 Yanjun Li CSRU2350

form3.html (3 of 6) Spring 2009 Yanjun Li CSRU2350

form3.html (4 of 6) Spring 2009 Yanjun Li CSRU2350

form3.html (5 of 6) Spring 2009 Yanjun Li CSRU2350

Spring 2009 Yanjun Li CSRU2350

frameset Element (1) Allow browser display more than one document simultaneously Element frameset Attribute cols defines the number and size of columns in a vertical frameset. Attribute rows defines the number and size of rows in a horizontal frameset. Values could be shown in pixels, %, * . Example: <frameset cols=“100, * ” /> There is no body element in the page. Spring 2009 Yanjun Li CSRU2350

frameset Element (2) Element frame Specifies the documents that will be loaded Attribute src Specifies URL of the page to display Attribute name Defines a unique name for the frame Attribute frameborder Defines the border of the frame, “0” or “1” Example : <frame name=“leftframe” src=“nav.html”> <frame name=“main” src=“main.html”> Spring 2009 Yanjun Li CSRU2350

Jump to a specified section Attribute src could be a specified section in a file. The specified section has an id attribute set. Example: <frame name=“main” src=“mainFour.html#t2”/> in mainFour.html : <table…. id=“t2”….> </table> Spring 2009 Yanjun Li CSRU2350

frameset Element (3) In nav.html file, the links should like : <a href = "links.html" target = "main“ > links </a> The name of the destination frame is the target. Spring 2009 Yanjun Li CSRU2350

frameset Element (3) Element noframes Displays text for browsers that do not handle frames. The noframes element goes inside the frameset element. Example: <noframes>  <body> Your browser does not handle frames! </body> </noframes> Spring 2009 Yanjun Li CSRU2350

index.html (1 of 2) Spring 2009 Yanjun Li CSRU2350

index.html (2 of 2) Spring 2009 Yanjun Li CSRU2350

nav.html (1 of 2) Spring 2009 Yanjun Li CSRU2350

nav.html (2 of 2) Spring 2009 Yanjun Li CSRU2350

Nested framesets framesets within framesets Example : <framset cols=“100,*”> <frame name=“left” src=“nav.html”/> <frameset rows=“175, *”> <frame name=“rowOne” src=“picture.html”/> <frame name=“rowTwo” src=“main.html” /> </framset> <noframes> <body> Frame is not handled </body> </noframes> </frameset> Spring 2009 Yanjun Li CSRU2350

index2.html (1 of 2) Spring 2009 Yanjun Li CSRU2350

index2.html (2 of 2) Spring 2009 Yanjun Li CSRU2350

Spring 2009 Yanjun Li CSRU2350

Web Resources www.vbxml.com/xhtml/articles/xhtml_tables www.webreference.com/xml/reference/xhtml.html www.w3schools.com Spring 2009 Yanjun Li CSRU2350

Reference Reproduced from the PowerPoints for Internet & World Wide Web How to Program, 3e by Deitel, Deitel and Goldberg © 2004. Reproduced by permission of Pearson Education, Inc. Spring 2009 Yanjun Li CSRU2350