ITI 134: HTML5 Desktop and Mobile Level II

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 © 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
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
ITI 133: HTML5 Desktop and Mobile Level I
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. 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.
Tutorial #8 – Creating Data Tables. Tutorial #6 Review – Layouts Two Column Fixed Width, Three Column Fixed Width Class VS. ID Container Universal Selector.
CIS 1310 – HTML & CSS 8 Tables. CIS 1310 – HTML & CSS Learning Outcomes  Create a Table  Apply Attributes to Format Tables  Increase the Accessibility.
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.
INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
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.
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.
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.
26 HTML Tables … surround table … surround each row … surround each cell … like, but bold and centered by default (for table headings) … table title No.
How To Create HTML Tables. Table Structure General HTML code for a Web Table: table cells table cells.
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.
CSE 154 Lecture 17: HTML tables.
Organizing Content with Lists and Tables
Web Development & Design Foundations with HTML5
Internet & Web Engineering Course Code:CS-228 Credit Hours (3+1) Lab 2 HTML TABLES Instructor: Muhammad Zeeshan Haider Ali Blog Address:
Muhammad Meer Hazaar (Software Engineer)
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
>> HTML: Tables.
Web Development & Design Foundations with HTML5 8th Edition
LAB Work 02 MBA 61062: E-Commerce
HTML Tables.
Programming the Web using XHTML and JavaScript
How to work with tables Chapter 10.
Chapter 7 Tables.
The Internet 10/25/11 XHTML Tables
ITI 133 HTML5 Desktop and Mobile Level I
Session I Chapter 10 - How to Work with Tables
8 Tables.
HTML and CSS 8th Edition Chapter 18: Tables.
ITI 133 HTML5 Desktop and Mobile Level I
HTML5 Level I Session III
HTML5 Session III Chapter 5 - How to Use the CSS Box Model for Spacing, Borders, and Backgrounds Chapter 6 - How to use CSS for page.
CSS Borders and Margins.
HTML5 Level I Session III
HTML5 Level I Session III
For the World Wide Web Styling Tables with CSS
HTML Level II (CyberAdvantage)
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with HTML5
Using tables in HTML Goes in order with Examples at my site.
Murach's HTML and CSS, 4th Edition
Site Development Foundations Lesson 6
Principles of Web Design 5th Edition
Lesson 5: HTML Tables.
CS3220 Web and Internet Programming More CSS
CS3220 Web and Internet Programming More CSS
Session IV Chapter 15 - How Work with Fonts and Printing
Web Development & Design Foundations with HTML5
ITI 133: HTML5 Desktop and Mobile Level I
Basics of Web Design Chapter 9 Table Basics Key Concepts
CS3220 Web and Internet Programming More CSS
Presentation transcript:

ITI 134: HTML5 Desktop and Mobile Level II Session 1 Chapter 9 - How to Work with Tables www.profburnett.com

Copyright © Carl M. Burnett Class Outline Basic Skills for Working with Tables Other Skills for Working with Tables 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett Table Header Cells Table Caption Table Header Table Rows Table Body Table Footer Table Data Cells 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett Common Elements for Coding Tables Element Description table Defines table tr Defines table row th Defines table header row td Defines table data cell in a row 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett The HTML for the Sales by Book Table <table> <tr> <th class="left">Book</th> <th>Year Published</th> <th>Sales</th> </tr> <td class="left">PHP and MySQL</td> <td>2010</td> <td>$372,381</td> . <tr id="total"> <th class="left">Total Sales</th> <td></td> <td>$2,154,786</td> </table> Example 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett Common properties for formatting tables Property Description border-collapse Keyword defines space between borders. Values: collapse or separate (default) border-spacing Relative or absolute value of space between cells padding Space between cell content text-align Horizontal Alignment vertical-align Vertical Alignment 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett CSS for the Sales by Book table table { border: 1px solid black; border-collapse: collapse; } th, td { padding: .2em .7em; text-align: right; } th.left, td.left { text-align: left; } #total { font-weight: bold; } Example W3C Exercise 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett The elements for the header, body, and footer Element Description thead Groups one of more rows in table header tbody Groups the rows between header and footer tfoot Groups one of more rows in table footer 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett HTML & CSS for a table with a header, body, and footer <table> <thead> <tr> <th class="left">Book</th> <th>Year published</th> <th>Total sales</th> </tr> </thead> <tbody> <td class="left">PHP and MySQL</td> <td>2010</td> <td>$372,381</td> . </tbody> <tfoot> <th class="left">Total Sales</th> <td></td> <td>$2,154,786</td> </tfoot> </table> thead, tfoot { background-color: aqua; } tfoot { font-weight: bold; } Example 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett The Syntax for CSS3 structural pseudo-class selectors Element Description :nth-child(n) nth child of parent :nth-last-child(n) nth child of parent counting backwards :nth-of-type(n) nth element of its type within the parent :nth-last-of-type(n) nth element of its type counting backwards Value Description odd Every odd child or element even Every even child or element n Every nth child or element 2n Same as even 3n Every third child or element (3,6,9…..) 2n+1 Same as odd 3n+1 Every third child or element starting with 1 (1, 4, 7, ……) 4/12/2019 Copyright © Carl M. Burnett

CSS3 for formatting a table without using classes th:first-child, td:first-child { text-align: left; } th:nth-child(2), td:nth-child(2) { text-align: center; } tbody tr:nth-child(even) { background-color: silver; } Example 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett The HTML for the figure and figcaption elements <figure> <figcaption>Total Sales by Book</figcaption> <table> . </table> </figure> The CSS for the figure and figcaption elements figure, figcaption { margin: 0; padding: 0; } figure { border: 1px solid black; width: 450px; padding: 15px; } figcaption { display: block; font-weight: bold; text-align: center; font-size: 120%; padding-bottom: .25em; } table { border-collapse: collapse; margin: 10px auto; } Example 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett Attributes for merging cells Element Description colspan The number of columns that will span cells rowspan The number of rows that will span cells 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett The HTML for the table <table> <thead> <tr> <th rowspan="2">Book</th> <th colspan="4">Sales</th> </tr> <th>North</th> <th>South</th> <th>West</th> <th>Total</th> </thead> <tbody> . </tbody> <tfoot> <th>Sales Totals</th> <td>$140,775</td> <td>$165,550</td> <td>$762,794</td> <td>$1,069,119</td> </tfoot> </table> The CSS for the merged cells th:first-child { vertical-align: bottom; } th:nth-child(2) { text-align: center; } tr:nth-child(2) th { text-align: right; } Example 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett Attributes that can be used for accessibility Attibute Description caption Describes the content of the table headers Identifies one or more header cells scope Keyword that associates with column or row. Keywords: col , row, rowgroup for merged cells 4/12/2019 Copyright © Carl M. Burnett

Copyright © Carl M. Burnett Student Exercise 1 Complete Exercise 9-1 on page 315 using Dreamweaver. Upload your HTML pages and CSS files to the live site to preview. 4/12/2019 Copyright © Carl M. Burnett

Chapter 10 - How to work with forms Copyright © Carl M. Burnett Class Review Basic Skills for Working with Tables Other Skills for Working with Tables Next – Chapter 10 - How to work with forms 4/12/2019 Copyright © Carl M. Burnett