WHAT'S A TABLE? Explain: The types of information commonly displayed in tables include stocks and shares, sports results, train timetables and price.

Slides:



Advertisements
Similar presentations
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
Advertisements

TABLES 6 How to create tables What information suits tables How to represent complex data in tables.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 Table1.html 1 2
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 4: Tables and Frames.
HTML TABLES Cyndi Hageman. Tables   Attributes Name or id – used to identify the table Border = set this to determine if there is a border and the size.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 8 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
 Tables are commonly used to display all manner of data, such as timetables, financial reports, and sports results etc.  Tables, just like spreadsheets,
Tables in HTML Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
>> 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.
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
HTML B OOT C AMP Chapter 10 Tables Kirkwood Continuing Education © Copyright 2015, Fred McClurg All Rights Reserved.
Chapter 9 Table Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
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.
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything › Text › Lists › Other tables › Pictures › …
 2003 Prentice Hall, Inc. All rights reserved. Introduction to HTML: Tables Outline 1 Introduction 2 Basic HTML Tables 3 Intermediate HTML Tables and.
CS-3432 Electronic Commerce Lecture – 7 Sikandar Shujah Toor
1 Tables attributes. 2 Table attributes: border Activates border around cells Syntax: – where “n” is a value in pixels which controls the “thickness”
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 Tables The HTML table model allows authors to arrange data - text, preformatted text, images, links, forms, form fields, other tables, etc. - into.
Tables, Rows, Columns, Cells, Header, Footer, Colspan, Rowspan
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.
Assistant Professor,UCER Naini,Allahabad
Chapter 9 Table Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Tables creating a table within a web page. What makes up a table? Columns Rows.
HTML Tables. 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).
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Organizing Content with Lists and Tables
Web Development & Design Foundations with HTML5
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
>> HTML: Tables.
Web Development & Design Foundations with HTML5 8th Edition
HTML Tables CS 1150 Spring 2017.
HTML Tables.
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Programming the Web using XHTML and JavaScript
How to work with tables Chapter 10.
Chapter 7 Tables.
H T M L A B E S X P I N D.
HTML Tables CS 1150 Fall 2016.
HTML Table Teacher: Ms. Olifer.
8 Tables.
Creating Tables Steps for creating a Table Important Facts about Table
Табеле Табеле се представљају елементом TABLE.
HTML and CSS 8th Edition Chapter 18: Tables.
Chapter 8 Tables.
Creating Tables Steps for creating a Table Important Facts about Table
TABLES.
Web Design and Development
HTML Level II (CyberAdvantage)
Web Development & Design Foundations with H T M L 5
Introduction to XHTML Cont:.
Web Development & Design Foundations with H T M L 5
Implementing Tables to Hold Data in HTML
HTML Tables.
Introduction to HTML.
Web Development & Design Foundations with HTML5
H T M L A B E S X P I N D.
Site Development Foundations Lesson 6
Principles of Web Design 5th Edition
Creating Tables Steps for creating a Table Important Facts about Table
H T M L A B E S X P I N D.
Hypertext Markup Language Table 11th Lecture
Web Development & Design Foundations with HTML5
Basics of Web Design Chapter 9 Table Basics Key Concepts
Presentation transcript:

WHAT'S A TABLE? Explain: The types of information commonly displayed in tables include stocks and shares, sports results, train timetables and price lists.

BASIC TABLE STRUCTURE <table> <tr> <td>15</td> <td>15</td> <td>30</td> </tr> <tr> <td>45</td> <td>60</td> <td>90</td> </tr> </table> Explain: Tables are drawn out one row at a time.

BASIC TABLE STRUCTURE <table> <tr> <td>15</td> <td>15</td> <td>30</td> </tr> <tr> <td>45</td> <td>60</td> <td>90</td> </tr> </table>

BASIC TABLE STRUCTURE <table> <tr> <td>15</td> <td>15</td> <td>30</td> </tr> <tr> <td>45</td> <td>60</td> <td>90</td> </tr> </table> Explain: The "tr" in the <tr> tag stands for "table row".

BASIC TABLE STRUCTURE <table> <tr> <td>15</td> <td>15</td> <td>30</td> </tr> <tr> <td>45</td> <td>60</td> <td>90</td> </tr> </table> Explain: The "td" in the <td> tag stands for "table data".

TABLE HEADINGS <table> <tr> <th></th> <th scope="col">Saturday</th> <th scope="col">Sunday</th> </tr> <tr> <th scope="row">Tickets sold</th> <td>120</td> <td>135</td> </tr> </table> Explain: You need to show tags for cells that have no data. For example, this table shows an empty cell on the first <th> element.

TABLE HEADINGS <table> <tr> <th></th> <th scope="col">Saturday</th> <th scope="col">Sunday</th> </tr> <tr> <th scope="row">Tickets sold</th> <td>120</td> <td>135</td> </tr> </table>

TABLE HEADINGS <table> <tr> <th></th> <th scope="col">Saturday</th> <th scope="col">Sunday</th> </tr> <tr> <th scope="row">Tickets sold</th> <td>120</td> <td>135</td> </tr> </table>

SPANNING COLUMNS ... <tr> <th>Monday</th> <td colspan="2">Geography</td> <td>Math</td> <td>Art</td> </tr> ...

SPANNING COLUMNS ... <tr> <th>Monday</th> <td colspan="2">Geography</td> <td>Math</td> <td>Art</td> </tr> ...

SPANNING ROWS ... <tr> <th>6pm - 7pm</th> <td rowspan="2">Movie</td> <td>Comedy</td> <td>News</td> </tr> <tr> <th>7pm - 8pm</th> <td>Sport</td> <td>Current Affairs</td> </tr>

SPANNING ROWS ... <tr> <th>6pm - 7pm</th> <td rowspan="2">Movie</td> <td>Comedy</td> <td>News</td> </tr> <tr> <th>7pm - 8pm</th> <td>Sport</td> <td>Current Affairs</td> </tr>

LONG TABLES <thead> <tr> <th>Date</th> <th>Income</th> <th>Expenditure</th> </tr> </thead> <tbody>...</tbody> <tfoot>...</tfoot> Explain: The <thead>, <tbody>, and <tfoot> tags can be used to hold heading, body, and footer information in a long table. For example, it can be used to put a heading and footer on every page of a long table and also to style contents differently than other parts of the table.

OLD CODE: WIDTH & SPACING <table width="400" cellpadding="10" cellspacing="10"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th>Balance</th> </tr> <tr> ... </tr> </table> Explain: These measurements should actually be done with CSS. It is only shown here because you may see it in older code.

OLD CODE: WIDTH & SPACING <table width="400" cellpadding="10" cellspacing="10"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th>Balance</th> </tr> <tr> ... </tr> </table>

OLD CODE: WIDTH & SPACING <table width="400" cellpadding="10" cellspacing="10"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th>Balance</th> </tr> <tr> ... </tr> </table>

OLD CODE: WIDTH & SPACING <table width="400" cellpadding="10" cellspacing="10"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th>Balance</th> </tr> <tr> ... </tr> </table>

OLD CODE: BORDER & BACKGROUND <table border="2" bgcolor="#efefef"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th bgcolor="#cccccc">Balance</th> </tr> <tr> ... </tr> </table> Explain: These borders and backgrounds should actually be done with CSS. It is only shown here because you may see it in older code.

OLD CODE: BORDER & BACKGROUND <table border="2" bgcolor="#efefef"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th bgcolor="#cccccc">Balance</th> </tr> <tr> ... </tr> </table>

OLD CODE: BORDER & BACKGROUND <table border="2" bgcolor="#efefef"> <tr> <th width="150"></th> <th>Withdrawn</th> <th>Credit</th> <th bgcolor="#cccccc">Balance</th> </tr> <tr> ... </tr> </table>

The <table> element is used to add tables to a web page. SUMMARY The <table> element is used to add tables to a web page. Clicks: Load individual bullets

SUMMARY A table is drawn out row by row. Each row is created with the <tr> element. Clicks: Load individual bullets

SUMMARY Inside each row are cells represented by the <td> element (or <th> if it is a header). Clicks: Load individual bullets

SUMMARY You can make cells of a table span more than one row or column using the rowspan and colspan attributes. Clicks: Load individual bullets

SUMMARY For long tables you can split the table into a <thead>, <tbody>, and <tfoot>. Clicks: Load individual bullets