Web Development & Design Foundations with HTML5

Slides:



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

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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 8 Key Concepts 1 Copyright © Terry Felke-Morris.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 Table1.html 1 2
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
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.
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.
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.
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.
CIS 1310 – HTML & CSS 8 Tables. CIS 1310 – HTML & CSS Learning Outcomes  Create a Table  Apply Attributes to Format Tables  Increase the Accessibility.
Tables in HTML Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
>> 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.
1 Web Developer Foundations: Using XHTML Chapter 3 XHTML Hyperlinks and Tables.
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 3 Key Concepts.
HTML B OOT C AMP Chapter 10 Tables Kirkwood Continuing Education © Copyright 2015, Fred McClurg All Rights Reserved.
Jozef Goetz, © Pearson Education Copyright (c) 2006 Prentice-Hall. All rights reserved.
Chapter 9 Table Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Basics of Web Design 1 Copyright © 2016 Pearson Education, Inc., Hoboken NJ.
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 8 Key Concepts 1 Copyright © Terry Felke-Morris.
 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.
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.
CS-3432 Electronic Commerce Lecture – 7 Sikandar Shujah Toor
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 8 Key Concepts 1 Copyright © Terry Felke-Morris.
Jozef Goetz, © Pearson Education Copyright (c) 2006 Prentice-Hall. All rights reserved.
Creating Tables in a Web Site HTML 4 Created by S. Cox.
Chapter 9 Table Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 5: HTML Tables.
Tables creating a table within a web page. What makes up a table? Columns Rows.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
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.
How to work with tables Chapter 10.
Chapter 7 Tables.
School of Business Administration
Session I Chapter 10 - How to Work with Tables
8 Tables.
Creating Tables Steps for creating a Table Important Facts about Table
Табеле Табеле се представљају елементом TABLE.
Creating Tables Steps for creating a Table Important Facts about Table
Web Design and Development
Lesson 8 Building Tables.
HTML Level II (CyberAdvantage)
Web Development & Design Foundations with H T M L 5
WHAT'S A TABLE? Explain: The types of information commonly displayed in tables include stocks and shares, sports results, train timetables and price.
Web Development & Design Foundations with H T M L 5
Implementing Tables to Hold Data in HTML
Web Development & Design Foundations with HTML5
Murach's HTML and CSS, 4th Edition
Site Development Foundations Lesson 6
ITI 134: HTML5 Desktop and Mobile Level II
Principles of Web Design 5th Edition
Creating Tables Steps for creating a Table Important Facts about Table
Lesson 5: HTML Tables.
Hypertext Markup Language Table 11th Lecture
Basics of Web Design Chapter 9 Table Basics Key Concepts
Presentation transcript:

Web Development & Design Foundations with HTML5 Chapter 8 Key Concepts Copyright © Terry Felke-Morris

Learning Outcomes In this chapter, you will learn how to ... Create a table on a web page Apply attributes to format tables, table rows, and table cells Increase the accessibility of a table Style an HTML table with CSS

HTML Table Tables are used on web pages to organize tabular information Composed of rows and columns – similar to a spreadsheet. Each individual table cell is at the intersection of a specific row and column. Configured with table, tr, and td elements

HTML Table Elements <table> Contains the table <tr> Contains a table row <td> Contains a table cell <caption> Configures a description of the table

HTML Table Example <table border="1"> <caption>Bird Sightings</caption> <tr> <td>Name</td> <td>Date</td> </tr> <td>Bobolink</td> <td>5/25/10</td> <td>Upland Sandpiper</td> <td>6/03/10</td> </table>

HTML Table Example 2 Using the <th> Element <table border="1"> <tr> <th>Name</th> <th>Birthday</th> </tr> <td>James</td> <td>11/08</td> <td>Karen</td> <td>4/17</td> <td>Sparky</td> <td>11/28</td> </table> Using the <th> Element

HTML Common Table Attributes align (obsolete) bgcolor (obsolete) border (obsolete) cellpadding (obsolete) cellspacing (obsolete) summary (obsolete but may be reinstated) width (obsolete) Use CSS to configure table characteristics instead of HTML attributes

HTML Common Table Cell Attributes align (obsolete) bgcolor (obsolete) colspan rowspan valign height (deprecated) width (deprecated) Use CSS to configure most table cell characteristics instead of HTML attributes

HTML colspan Attribute <table border="1"> <tr> <td colspan=“2”> Birthday List</td> </tr> <td>James</td> <td>11/08</td> <td>Karen</td> <td>4/17</td> </table>

HTML rowspan Attribute <table border="1"> <tr> <td rowspan="2">This spans two rows</td> <td>Row 1 Column 2</td> </tr> <td>Row 2 Column 2</td> </table>

Accessibility and Tables Use table header elements (<th> tags) to indicate column or row headings. Use the caption element to provide a text title or caption for the table. Complex tables: Associate table cell values with their corresponding headers <th> tag id attribute <td> tag headers attribute

<table border="1"> <caption>Bird Sightings</caption> <tr> <th id="name">Name</th> <th id="date">Date</th> </tr> <td headers="name">Bobolink</td> <td headers="date">5/25/10</td> <td headers="name">Upland Sandpiper</td> <td headers="date">6/03/10</td> </table>

Checkpoint Describe the purpose of using a table on a web page. Describe the difference between the cellpadding and cellspacing table attributes. Describe one coding technique that increases the accessibility of an HTML table.

Using CSS to Style a Table HTML Attribute CSS Property align Align a table: table { width: 75%; margin: auto; } Align within a table cell: text-align bgcolor background-color cellpadding padding cellspacing border-spacing or border-collapse height valign vertical-align width border border, border-style, or border-spacing -- background-image

CSS Structural Pseudo-classes Purpose :first-of-type Applies to the first element of the specified type :first-child Applies to the first child of an element (CSS2 selector) :last-of-type Applies to the last element of the specified type :last-child Applies to the last child of an element :nth-of-type(n) Applies to the “nth” element of the specified type Values: a number, odd, or even Zebra Stripe a Table tr:nth-of-type(even) { background-color: #eaeaea; }

Table Row Groups <thead> table head rows <table> <caption>Time Sheet</caption> <thead> <tr> <th id="day">Day</th> <th id="hours">Hours</th> </tr> </thead> <tbody> <td headers="day">Monday</td> <td headers="hours">4</td> … <td headers="day">Friday</td> <td headers="hours">3</td> </tbody> <tfoot> <td headers="day">Total</td> <td headers="hours">18</td> </tfoot> </table> Table Row Groups <thead> table head rows <tbody > table body rows <tfoot> table footer rows

Summary This chapter introduced the HTML and CSS techniques used to create and configure tables on web pages.