Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and.

Similar presentations


Presentation on theme: "INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and."— Presentation transcript:

1 INTRODUCTORY Tutorial 7 Creating Tables

2 XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and layout tables Create a table to display and organize data Merge table columns or rows Understand how to plan and use layout tables Create a table for layout

3 XP Objectives Learn how to nest a data table within a layout table Create styles to change the appearance of a table Position the cell contents vertically Position a table horizontally New Perspectives on Blended HTML, XHTML, and CSS3

4 XP Understanding the Limitations of HTML Tables Using HTML, you must enter the code for a table one row at a time and one cell at a time To organize data, you create a data table, which is a table used to align text and numbers in columns and rows To design pages, you can create a layout table, which is a table intended solely for page layout When you place a table inside another table, you are creating a nested table New Perspectives on Blended HTML, XHTML, and CSS4

5 XP Creating a Table Border To create a table border, enter the following code: where border is the border attribute and pixelvalue is the width of the border expressed in pixels. The higher the pixel value, the thicker the border New Perspectives on Blended HTML, XHTML, and CSS5

6 XP Entering the Title and Summary Attributes To begin creating a table, enter the following code: where table is the start table tag, title is the title attribute, tabletitle is a brief description of the table to be used as a ScreenTip, summary is the summary attribute, tablesummary is a detailed description of the table content, and is the end table tag on a separate line New Perspectives on Blended HTML, XHTML, and CSS6

7 XP Creating a Table Caption To create a table caption, enter the following code: captiontext where caption is the start caption tag, captiontext is the text in the caption, and is the end caption tag. If you want to position the caption below the table, insert the align attribute into the caption tag and assign the value of bottom New Perspectives on Blended HTML, XHTML, and CSS7

8 XP Creating Table Rows To create table rows, enter the following code: tabledata where is the start table row tag, td is the start table data tag, tabledata is the data for the cell, is the end table data tag, and is the end table row tag Most HTML tables have one or more rows used for the column headers, which by default make the text in the header centered and bold Use the optional table header tags, and, to create table headers New Perspectives on Blended HTML, XHTML, and CSS8

9 XP Spanning Cells Across Columns To span a cell across columns, enter the following code: where colspan is the colspan attribute and value is the number of columns that will be spanned. The colspan attribute and its value must be placed in the cell in which the colspan should begin. All empty spanned table data cells should be deleted New Perspectives on Blended HTML, XHTML, and CSS9

10 XP Merging Cells in Rows To span a cell across rows, enter the following code: where rowspan is the rowspan attribute and value is the number of rows that will be spanned. The rowspan attribute and its value must be placed in the cell in which the rowspan should begin. All empty spanned table data cells should be deleted. If a row containing a rowspan is formatted, the row will include all the cells horizontally and the merged cells vertically New Perspectives on Blended HTML, XHTML, and CSS10

11 XP Merging Cells in Rows New Perspectives on Blended HTML, XHTML, and CSS11

12 XP Using Tables for Layout New Perspectives on Blended HTML, XHTML, and CSS12

13 XP Using Tables for Layout New Perspectives on Blended HTML, XHTML, and CSS13

14 XP Inserting Comments into the Table New Perspectives on Blended HTML, XHTML, and CSS14

15 XP Removing the Table Border Now that the placeholder text has been replaced with actual data, you no longer need to display the nested data table border New Perspectives on Blended HTML, XHTML, and CSS15

16 XP Using CSS with Tables Because the layout table occupies the entire body section, almost all styles you create for the table will supersede any styles you create for the body New Perspectives on Blended HTML, XHTML, and CSS16

17 XP Using CSS with Tables New Perspectives on Blended HTML, XHTML, and CSS17

18 XP Using CSS with Tables New Perspectives on Blended HTML, XHTML, and CSS18

19 XP Striping Rows Many tables mimic the appearance of computer printout where each row has an alternating background color, making the rows easier to locate and read New Perspectives on Blended HTML, XHTML, and CSS19

20 XP Formatting Columns New Perspectives on Blended HTML, XHTML, and CSS20

21 XP Using CSS with Tables New Perspectives on Blended HTML, XHTML, and CSS21


Download ppt "INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and."

Similar presentations


Ads by Google