Advanced Tables.

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.
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
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
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
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.
Introducing Web Tables
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Tables. Tables2 Terminology Caption Headings Cell Data.
Tables And Lists. Slide 2 Lecture Overview Learn about the basics of tables Create simple 2-dimensional tables Format tables Create tables with complex.
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 HTML and css 2012 Brian Davison. Assistants Dennis Doug Louise Martin Steven Stephanie.
Identifies the Structure Table Row Column 1 Table Heading Column 2.
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
>> 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.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 TECH1001 Lecture 6 Electronic Publishing and Production 1 More About Tables.
 2003 Prentice Hall, Inc. All rights reserved. Introduction to HTML: Tables Outline 1 Introduction 2 Basic HTML Tables 3 Intermediate HTML Tables and.
Computer Science 101 Lists and Tables. Lists Unordered lists - use a bullet Ordered lists - use a number, Roman numeral, or letter.
Creating Tables in a Web Site HTML 4 Created by S. Cox.
Advanced Tables. Let's build some tables using each of these features and then try combining both features into the same table. Spanning Rows and Columns.
TABLES. Session Checklist ► Learn the ways that tables can help you organize data on your Web site ► Learn how to prepare a spreadsheet-like table that.
Advanced Tables. Spanning Columns and Rows: So far, our tables have been relatively simple, with a uniform grid of rows and columns: XHTML allows us to.
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).
Client-Side Internet and Web Programming
XHTML Tables.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Organizing Content with Lists and Tables
Elements of HTML Web Design – Sec 3-2
>> HTML: Tables.
Elements of HTML Web Design – Sec 3-2
Web Development & Design Foundations with HTML5 8th Edition
Tables and Frames.
Getting Started – Table 2
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
Chapter 5 Introduction to XHTML: Part 2
Elements of HTML Web Design – Sec 3-2
Introduction to HTML.
Client-Side Internet and Web Programming
How to work with tables Chapter 10.
Chapter 7 Tables.
H T M L A B E S X P I N D.
Lesson 7 Week 7 Course project defence Nov. 7, 2017
The Internet 10/25/11 XHTML Tables
HTML Tables CS 1150 Fall 2016.
HTML Table Teacher: Ms. Olifer.
XHTML Tables.
Web Design and Development
Basic Tables.
Introduction to XHTML Cont:.
Using rowspan and colspan attributes
Basic Tables.
Advanced Tables.
Using rowspan and colspan attributes
Introduction to HTML.
H T M L A B E S X P I N D.
Basic Tables.
Site Development Foundations Lesson 6
The Internet 10/27/11 XHTML Forms
H T M L A B E S X P I N D.
Advanced Tables.
Introduction to Web Authoring
XHTML Tables.
Contents: 1. More on tables 2. Images (the <img> tag)
Presentation transcript:

Advanced Tables

Spanning Rows and Columns So far, our tables have been relatively simple, with a uniform grid of rows and columns: XHTML allows us to create more complex table elements by spanning multiple rows or columns, like this: Let's build some tables using each of these features and then try combining both features into the same table.

Example: Spanning Columns We can build a data cell that spans more than one column by using the colspan attribute: <table border="1"> <tr> <td colspan="3">Row 1 Col 1-3</td> </tr> <td>Row 2 Col 1</td> <td>Row 2 Col 2</td> <td>Row 2 Col 3</td> <td>Row 3 Col 1</td> <td>Row 3 Col 2</td> <td>Row 3 Col 3</td> </table> The value placed in the colspan attribute informs the browser how many columns to combine into a single data cell.

Example: Spanning Rows Using the same principle, we can build a data cell that spans more than one row by using the rowspan attribute: <table border="1"> <tr> <td rowspan="3">Col 1 Row 1-3</td> <td>Row 1 Col 2</td> <td>Row 1 Col 3</td> </tr> <td>Row 2 Col 2</td> <td>Row 2 Col 3</td> <td>Row 3 Col 2</td> <td>Row 3 Col 3</td> </table> The rowspan attribute works the same way by informing the browser how many rows to combine into a single cell.

Example: Spanning Rows and Columns <table border="1"> <tr> <th colspan="3">SUVs</td> </tr> <th rowspan="2">Ford</td> <td>2012</td> <td>Expedition</td> <td>2011</td> <td>Explorer</td> <th rowspan="2">Chevrolet</td> <td>2009</td> <td>Suburban</td> <td>2013</td> <td>Tahoe</td> </table> Both the colspan and rowspan features can be used in the same table to create a more complex table structure. Notice that these two attributes can also be applied to table header elements, as we did in this example.

Adding a Table Caption <table border="1"> <caption>Vehicle Inventory</caption> <tr> <th colspan="3">SUVs</td> </tr> <th rowspan="2">Ford</td> <td>2012</td> <td>Expedition</td> <td>2011</td> <td>Explorer</td> ... </table> To add a caption to the table, we use the <caption> element immediately after the opening <table> tag. The text enclosed within the <caption> element will be displayed above the table and centered.

Other Elements Inside Tables <table border="1"> <tr> <td> <p><a href="page2.html">Go to Next Page</a></p> </td> <img src="check.jpg" alt="check mark" /> </tr> <ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol> <td>R1C1</td><td>R1C2</td> <td>R2C1</td><td>R2C2</td> </table> Many other elements can be placed inside table cells, including paragraphs, links, images, lists, and even other tables.