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.

Slides:



Advertisements
Similar presentations
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.
Advertisements

XP Tutorial 4New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
Chapter 3 – Web Design Tables & Page Layout
Designing Web Pages Tables part one. Using Tables for Page Layout 2.
Tutorial 5 Working with Web Tables
Internet Basics & Way Beyond!
Working with Web Tables
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
New Perspectives on Creating Web Pages 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.
Tutorial 4: Designing a Web Page with Tables
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 4: Designing a Web Page with Tables.
XP 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
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.
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.
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.
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.
XP 1 Tutorial 4 Designing a Web Page with Tables.
XHTML1 Tables N100 Creating a Simple Web Page. XHTML2 Creating Basic Tables Tables are collections of rows and columns that you use to organize and display.
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.
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.
INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and.
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.
10/4/2015Tables1 Spring, 2008 Modified by Linda Kenney 4/2/08.
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
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
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 4 1 New Perspectives on Creating Web Pages with HTML Tutorial 4: Designing a.
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
Week 5 Working with Tables. 2 Understanding Table Basics.
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.
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.
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:
Lesson 7. Tables Table Tags and Attributes Tables HTML tables are used in two main ways: 1.To organize tabular data in a familiar spreadsheet-like way.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
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.
Unit 4 Create and Use Tables. TITLE CORNELL NOTES TOPIC: NOTES: Name: Date: 09/08/2009 Period : Summary: Reasons for using tables Unit 4 Page 1 Display.
Positioning Objects with CSS and Tables
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
Web111a_chapt04.ppt HTM: Section 4 Tables Table Types Text table elements Easy to use Use fixed-font text (font family monospace) Andale Mono Courier Monaco.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
Tutorial 5 Working with Web Tables
Designing a Web Page with Tables
CNIT 131 HTML5 - Tables.
Working with Tables: Module A: Table Basics
Positioning Objects with CSS and Tables
Tables and Frames.
LAB Work 02 MBA 61062: E-Commerce
Tutorial 5 Working with Tables and Columns
Tutorial 5 Working with Web Tables
Tables:.
New Perspectives on Creating Web Pages with HTML
Using HTML Tables SWBAT: - create tables using HTML
TABLES.
For the World Wide Web Styling Tables with CSS
Lesson 5: HTML Tables.
Positioning Objects with CSS and Tables
Presentation transcript:

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 to indent the tags or place them on separate lines, but you may find it easier to interpret your code if you do so. After the table structure is in place, you’re ready to add the text for each cell. … … …

2 Example: A Simple 2x2 Table two rows two columns First Cell Second Cell Third Cell Fourth Cell

3 Adding Table Headings with the Tag Text in cells formatted with the tag is bold and centered above each table column. Row of table headings

4 Result of Table Headings as Displayed in the Browser table headings appear bold and centered over their columns

5 Creating a Table Caption The syntax for creating a caption is: caption text where alignment indicates the caption placement –a value of bottom centers the caption below the table –a value of top or center centers the caption above the table –a value of left or right place the caption above the table to the left or right

6 Inserting a Table Caption caption will be centered above the table caption text table caption

Marking Row Groups in a Table You can divide a table’s rows into row groups, in which each group element contains different types of content and can be formatted differently 0 or 1 of these 0 or more of these. They are listed last (after the tfoot element)

Marking Column Groups in a Table Once the table columns have been determined by the browser, you can reference them through the use of column groups … Implies there are 7 columns in this table.

9 Adding a Table Border By default, browsers display tables without table borders The syntax for creating a table border is: … where value is the width of the border in pixels

10 Adding a 5-Pixel Border to a Table Only the outside border is affected by the border attribute; the internal gridlines are not affected

Adding a Table Summary The summary attribute allows you to include a more detailed description about the table

12 Adding Space Between Table Cells The cell spacing attribute controls the amount of space inserted between table cells The syntax for specifying the cell space is: –value is the width of the interior borders in pixels –the default cell spacing is 2 pixels

13 Example: Setting the Cell Spacing to 0 Pixels Setting the cell spacing to 0 reduces the width of the borders between individual table cells. This will not remove the border between the cells.

14 Adding Space Within a Cell To control the space between the table text and the cell borders, add the cell padding attribute to the table tag The syntax for this attribute is: –value is the distance from the table text to the cell border, as measured in pixels –the default cell padding value is 1 pixel

15 Example: Setting the Cell Padding to 4 Pixels A table with an increased amount of cell padding. By increasing the cell padding, you added space inside the table.

16 Defining the Table Size The syntax for specifying the table size is: where size is the width and height of the table as measured in pixels or as a percentage of the display area If you specify an absolute size for a table in pixels, its size remains constant, regardless of the browser or monitor settings used

17 Example: Setting the Width of the Table to 70% of the Page Width

18 Setting Cell and Column Sizes Horizontally To set the width of an individual cell, add the width attribute to either the or tags The syntax is: width=“value” –value can be expressed either in pixels or as a percentage of the table width –a width value of 30% displays a cell that is 30% of the total width of the table

19 Setting Cell and Column Sizes Vertically The height attribute can be used in the or tags to set the height of individual cells The height attribute is expressed either in pixels or as a percentage of the height of the table If you include more text than can be displayed within that height value you specify, the cell expands to display the additional text

Specifying Which Sides of the Table Have Borders A table frame specifies which sides of the table have borders

Specifying Which Internal Gridlines of the Table Are Drawn A table rule specifies how the internal gridlines are drawn within the table

22 Spanning Rows and Columns To merge several cells into one, you need to create a spanning cell A spanning cell is a cell that occupies more than one row or column in a table Spanning cells are created by inserting the rowspan and colspan attribute in a or tag. The syntax for these attributes is: … –value is the number of rows or columns that the cell spans in the table

23 Example of Spanning Cells This cell spans two columns and two rows This cell spans three columns This cell spans three rows

24 A Table Structure with a Row-Spanning Cell HTML code resulting table four table cells in the first row only three table cells are required for the second and third rows

25 Horizontally Aligning a Table on the Web Page To align a table with the surrounding text, use the align attribute as follows: align=“alignment” –alignment equals left, right, or center –left or right alignment places the table on the margin of the Web page and wraps surrounding text to the side –center alignment places the table in the horizontal center of the page, but does not allow text to wrap around it The align attribute is similar to the align attribute used with the tag

26 Aligning the Cell Contents of a Table By default, cell text is placed in the middle of the cell, aligned with the cell’s left edge By using the align and valign attributes, you can specify the text’s horizontal and vertical placement To align the text for a single column, you must apply the align attribute to every cell in that column

27 Values of the align and valign Attributes

28 You Can Color Rows or Individual Cells of the Table

29 Applying a Background Image to a Table, Row, or Cell parch.jpg

Formatting Tables with CSS Starting with CSS2, Cascading Style Sheets included support for Web tables. For example, HTML file : CSS file : table.schedule td {border:10px solid gray} To avoid confusion, it’s best to style tables either inline or using CSS but not mix the two approaches

Precedence Rules in Formatting Tables with CSS

32 Using Tables for Layout HTML tables are often used to define the layout of an entire Web page If you want to design a page that displays text in newspaper style columns, or separates the page into distinct sections, you’ll find tables an essential and useful tool

33 Creating a Newspaper-Style Layout With Nested Tables

Are Table Layouts Really a Good Idea? Table layouts are not in the spirit of HTML Table layouts are difficult to revise Tables take longer to render Tables can be code-heavy Tables can be inaccessible to users with disabilities