Tables with XHTML Please use speaker notes for additional information!

Slides:



Advertisements
Similar presentations
HTML TABLES EXPLAINED. What is a TABLE? The HTML table allows web designers to arrange & organize data -- text, images, hyperlinks, forms, form fields,
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.
1 Tables and Lists. 2 Are Tables still needed? Tables were once used to help structure and style our pages CSS now replaces most of the old uses for tables.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Internet Basics & Way Beyond!
Working with Web Tables
HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
Tutorial 4: Designing a Web Page with Tables
Introductory XHTML pages Please use speaker notes for additional information!
Introducing Web Tables
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Using HTML Tables.
Using color and fonts in HTML and XHTML Please use speaker notes for additional information!
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
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.
Images and Tables. Displaying Image Attributes: SRC= " mypic.gif " – Name of the picture file SRC= " pic/mygif.jpg " – Name of file found in pic directory.
What is a TABLE? The HTML table allows web designers to arrange & organize data -- text, images, hyperlinks, forms, form fields, other tables, etc. Tables.
Notes Ch. 12—Creating Tables Web Page Design. Why Use Tables? Tables are used to create a variety of items such as calendars, charts, and spreadsheets.
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.
HTML Essentials Tables and Table Tags. Overview Use of Tables goes beyond tabulating data Frequently used to format Web pages / control layout Especially.
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.
CIS 1310 – HTML & CSS 8 Tables. CIS 1310 – HTML & CSS Learning Outcomes  Create a Table  Apply Attributes to Format Tables  Increase the Accessibility.
Identifies the Structure Table Row Column 1 Table Heading Column 2.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorial 5: Working with Tables.
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.
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
XHTML Tables. Tables create little boxes in which you can place things to keep them organized. The little boxes are called table cells. Tables are created.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
Tables Learning Web Design: Chapter 8. Overview of Tables Uses for tables How to create a table Using CSS to style a table Nested tables Advanced table.
CSS in XHTML continued Please use speaker notes for additional information!
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
Using images with XHTML Please use speaker notes for additional information!
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 2.
Getting Started with HTML Please use speaker notes for additional information!
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.
Tutorial 5 Working with Tables and Columns
Tutorial 5 Working with Tables and Columns
Frames in XHTML Please use speaker notes for additional information!
Page Layout Styles Exploring Computer Science – Lesson 3-8 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
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.
ECA 228 Internet/Intranet Design I Tables. ECA 228 Internet/Intranet Design I Basic HTML Tables Created as a way to present rows and clumns of data.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Tables in HTML. Table Tag HTML tables always begin and end with a table tag. Syntax:
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 5: Working with Tables Kelly L.
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.
CSS with XHTML Please use speaker notes for additional information!
Using Tables for Layout INP150 Session #8. Layout Map out your page Design with paper and pencil Determine number of rows and columns you need Determine.
Building a Web Page. Create A New Folder  Right click on the desktop and select New / Folder  Name the folder playpen.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
INT222 – Internet Fundamentals
CSS Table Styling. Up to this point, as we haven't applied any CSS styling to our tables, our example tables have not been too pleasing to the eye. CSS.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
1 Mansoor Ahmed Bughio. 2 HTML TABLES With HTML you can create tables. Examples Tables This example demonstrates how to create tables in an HTML document.
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
LAB Work 02 MBA 61062: E-Commerce
Introduction to HTML.
H T M L A B E S X P I N D.
Using HTML Tables SWBAT: - create tables using HTML
TABLES.
Basic Tables.
Basic Tables.
H T M L A B E S X P I N D.
Using tables in HTML Goes in order with Examples at my site.
Basic Tables.
Site Development Foundations Lesson 6
H T M L A B E S X P I N D.
Presentation transcript:

Tables with XHTML Please use speaker notes for additional information!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trnasitional//EN" " Start looking at TABLES This web page is going to introduce tables. First row, first column First row, second column Second row, first column Second row, second column The problem is, this doesn't look much like a table because there aren't any borders around it. Now lets take the same table and put the BORDER attribute in the TABLE designation to make it look more like a table. First row, first column First row, second column Second row, first column Second row, second column Now let's say that we want this aligned in the center of the screen instead of against the left wall. This can be accomplished by using the DIV which is used to make a division in the formatting. Note that you must also close the division or the center alignment will continue past the table. The table tag specifies that we using a table structure to show the data. The tr tag specifies a row in the table The td tag is for table data - it is essentially a cell of data.

First row, first column First row, second column Second row, first column Second row, second column You now have a table that is in the center of the screen.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Start looking at TABLES using XHTML div { text-align: center; } table { border: solid thin; } td { border: solid thin; } This web page is going to introduce tables. I am setting up borders in the CSS because two of my tables need borders. I can use inline style to set the borders to none for the table where I do not want borders to appear. First row, first column First row, second column Second row, first column Second row, second column The problem is, this doesn't look much like a table because there aren't any borders around it. This style establishes the style for the page. Divisions will be centered and the output of the table tag and the td tag will have a solid thin border. Here I am using inline style to override the style in the header and establish no borders on the table and td tags.

Now I am going to use the CSS settings to put borders on the table and on the individual cells (td for table data). First row, first column First row, second column Second row, first column Second row, second column Now let's say that we want this aligned in the center of the screen instead of against the left wall. This can be accomplished by using the DIV which is used to make a division in the formatting. Note that you must also close the division or the center alignment will continue past the table. The center attribute is set in the CSS for div. First row, first column First row, second column Second row, first column Second row, second column You now have a table that is in the center of the screen. div { text-align: center; } The setting of text-align center for the division means that the table within the division will be aligned to the center.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trnasitional//EN" " Continue looking at TABLES This web page is going to continue looking at tables. Now lets look at putting captions on the table and on the columns: A caption on the whole table is done with the CAPTION command. Note that the caption can be either at the top or bottom of the table (ALIGN=BOTTOM puts the caption underneath the table). The TH command creates column headers. This is the sample table complete with caption COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column

This is the sample table complete with caption ROW #S COLUMN #1 COLUMN #2 First row First row, first column First row, second column Second row Second row, first column Second row, second column Notice that things designated with the TH are in bold to stand out as row and column headers while things designated as TD are not bold - they are the data. You can alter the BORDER on the table and you can use CELLPADDING to leave a little space inside, between the border and the data in the cell. COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column Note that the th tag can be used outside the first row. In this case I want the left most cell to be a header. Cellpadding can be used to leave a little space around the data.

COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column Notes on data alignment options If you use an ALIGN (LEFT, RIGHT, CENTER) clause within the TR, the data within that row will be horizontally aligned If you want to use vertical alignment than use the VALIGN clause within the TR You can also use ALIGN with TOP or BOTTOM within the TD This is the sample table complete with caption ROW #S COLUMN #1 COLUMN #2 First row 1,1 1,2 Second row 2,1 2,2 Third row 3,1 3,2

Remember that is it very important to test your code in a variety of browsers. Even if code pases the XHTML test, it may not be implement by a particular browser. In this case, Explorer 6 has not implemented the ability to put the caption at the bottom.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Continue looking at TABLES table { border: solid thin; } td { border: solid thin; } This web page is going to continue looking at tables. Now lets look at putting captions on the table and on the columns: A caption on the whole table is done with the CAPTION command. Note that the caption can be either at the top or bottom of the table (ALIGN=BOTTOM puts the caption underneath the table). The TH command creates column headers. This is the sample table complete with caption COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column table { border: solid thin; caption-side: bottom; } This is a way to put the caption at the bottom that is currently unsupported in Explorer.

The caption is shown at the bottom of the table in this viewing through Netscape.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Continue looking at TABLES table { border: solid thin; caption-side: bottom; } td { border: solid thin; } This web page is going to continue looking at tables. Now lets look at putting captions on the table and on the columns: A caption on the whole table is done with the CAPTION command. Note that the caption can be either at the top or bottom of the table (ALIGN=BOTTOM puts the caption underneath the table). The TH command creates column headers. This is the sample table complete with caption COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column This shows the code that puts the caption at the bottom in some browsers. If it is not supported, the default of caption at the top is executed.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Continue looking at TABLES table { border: solid thick; padding: 10; } td, th { border: solid thin; } This web page is going to continue looking at tables. You can alter the BORDER on the table and you can use CELLPADDING to leave a little space inside, between the border and the data in the cell. COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column In this example the default for borders is solid and thck with a padding (cellpadding) of 10.

COLUMN #1 COLUMN #2 First row, first column First row, second column Second row, first column Second row, second column This is the sample table complete with caption ROW #S COLUMN #1 COLUMN #2 First row 1,1 1,2 Second row 2,1 2,2 Third row 3,1 3,2

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " Mrs. Grocer's Schedule Page If I am not in my office, please check the computer labs. MRS. GROCER'S SCHEDULE - OFFICE: K112 HOURS MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY 8:00 To 8:52 NOT ON CAMPUS 9:00 To 9:52 WEB OFFICE HOUR BY APPT Sometimes need to reschedule due to conflicts with on campus committments CIS 17 K-201 CIS 17 K-205

10:00 To 10:52 NOT ON CAMPUS CIS47 K-201 CIS47 K :00 To 11:52 SOMETIMES AVAILABLE OFFICE HOUR OFFICE HOUR BY APPT 12:00 To 12:52 CIS 50 K-232 CIS 50 K-201 CIS 50 K-232 1:00 To 1:52 USUALLY AVAILABLE CIS 44 K-105 CIS44 K-205 MEETINGS OR AVAILABLE 2:00 To 2:52 OFFICE HOUR BY APPT 3:00 To 3:52 MEETINGS OR AVAILABLE 3:30 - 6:40 CIS67 K-201 OFFICE HOUR BY APPT SOMETIMES AVAILABLE

4:00 To 4:52 FREQUENTLY AVAILABLE SOMETIMES AVAILABLE 5:00 To 5:52 6:00 To 6:40 NOT AVAILABLE EVENINGS AND WEEKENDS: I am usually available evenings and weekends for Web Consultation. You can make a Web Office Hour Appointment with me on evenings or weekend via - please use the address given out in class. Send to Mrs. Grocer : Back to the Top Return to home page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Mrs. Grocer's Schedule Page table { border: solid thin; padding: 5; width: 100%; } td { border: solid thin; width: 20%; } th { border: solid thin; } If I am not in my office, please check the computer labs. MRS. GROCER'S SCHEDULE - OFFICE: K112 HOURS MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY

table { border: solid thin; border-color: lime; background-color: beige; padding: 5; width: 100%; } td { border: solid thin; width: 20%; } th { border: solid thin; }