Lesson 7 Week 7 Course project defence Nov. 7, 2017

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

Chapter 3 – Web Design Tables & Page Layout
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Internet Basics & Way Beyond!
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.
Tutorial 4: Designing a Web Page with Tables
© 2004, Robert K. Moniot Chapters 4 & 5 Introduction to HTML, More Details.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
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.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
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.
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.
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.
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.
HTML Comprehensive Concepts and Techniques Second Edition Project 3 Creating Tables in a Web Site.
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
HTML Overview Part 4 – Tables 1. HTML Tables  Tables are defined with the tag pair.  A table is divided into rows with tag pairs. o tr stands for "table.
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
Html Tables Basic Table Markup. How Tables are Used For Data Display Tables were originally designed to display and organize tabular data (charts, statistics,
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
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.
1 TECH1001 Lecture 6 Electronic Publishing and Production 1 More About Tables.
Kevin Murphy Introduction to Tables Masters Project CS 490.
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.
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.
Computer Science 101 Lists and Tables. Lists Unordered lists - use a bullet Ordered lists - use a number, Roman numeral, or letter.
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.
HTML Tables The HTML table model allows authors to arrange data - text, preformatted text, images, links, forms, form fields, other tables, etc. - into.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
1 Mansoor Ahmed Bughio. 2 HTML TABLES With HTML you can create tables. Examples Tables This example demonstrates how to create tables in an HTML document.
Designing a Web Page with Tables
CNIT 131 HTML5 - Tables.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Advanced Tables.
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
Elements of HTML Web Design – Sec 3-2
>> HTML: Tables.
Web Development & Design Foundations with HTML5 8th Edition
Tables and Frames.
LAB Work 02 MBA 61062: E-Commerce
HTML Tables CS 1150 Spring 2017.
HTML Tables.
Tutorial 5 Working with Tables and Columns
Introduction to HTML.
H T M L A B E S X P I N D.
TABLES.
8 Tables.
Using HTML Tables SWBAT: - create tables using HTML
TABLES.
TABLES IN HTML No, not that kind of table!! THIS KIND!!
If You Know Nothing About HTML, This is Where You Start.
Advanced Tables.
Introduction to HTML.
Formatting with tables
H T M L A B E S X P I N D.
Site Development Foundations Lesson 6
Lesson 5: HTML Tables.
H T M L A B E S X P I N D.
Basics of Web Design Chapter 9 Table Basics Key Concepts
Presentation transcript:

Lesson 7 Week 7 Course project defence Nov. 7, 2017 Tables Lesson 7 Week 7 Course project defence Nov. 7, 2017

Objectives At the end of this lesson, you should be able to do the following: • Defining tables in HTML • Creating captions, rows, and heading and data cells • Modifying cell alignment • Creating cells that span multiple rows or columns • Adding color to tables

Defining Tables Introduction Tables were officially introduced in HTML 3.2. Since then, they’ve had an enormous influence on Web page design and construction. HTML 4.01 includes changes that improve the way tables are loaded and displayed in browsers.

Creating captions, rows, and heading and data cells Creating tables in HTML is a degree more complex than anything you’ve seen so far in this lessons. Think about how many different types of tables there are. A table can be a 3-by-3 grid with labels across the top, or two side-by-side cells, or a complex Excel spreadsheet that comprises many rows and columns of various sizes. Representing tables in HTML is heavy on tags, and the tags can be hard to keep track of when you get going.

Table Parts Before getting into the actual HTML code to create a table, let’s look at the following terms so that we both know what we’re talking about: • The caption also called title comes before the heading and are optional. • The table headings label the rows, columns, or both. Usually they’re in an emphasized font that’s different from the rest of the table. They’re optional. • Table cells are the individual squares in the table. A cell can contain normal table data or a table heading. • Table data is the values in the table itself. The combination of the table headings and table data makes up the sum of the table.  

Table Parts Figure 1

The <table> Element To create a table in HTML, you use the <table>...</table> element to enclose the code for an optional caption, and then add the contents of the table itself: <table> ...table caption (optional) and contents... </table>  

Example <table border="1"> <caption>Vital Statistics</caption> <tr> <th>Name</th> <th>Height</th> <th>Weight</th> <th>Eye Color</th> </tr> <td>Alison</td> <td>5.4'</td> <td>140</td> <td>Blue</td>

<tr> <td>Tom</td> <td>6.0'</td> <td>165</td> <td>Hazel</td> </tr> <td>Susan</td> <td>5.1'</td> <td>97</td> <td>Brown</td> </table>

Output Figure 2

Rows and Cells The cells within each row are created using one of two elements: • <th>...</th> elements are used for heading cells. Generally, browsers center the contents of a <th> cell and render any text in the cell in boldface. • <td>...</td> elements are used for data cells. td stands for table data as seen in figure 2.

Captions Table captions tell your visitor what the table is for. The <caption> element, created just for this purpose, displays the text inside the tag as the table caption (usually centered above the table). <caption>Vital Statistics</caption>

Sizing Tables, Borders, and Cells The width attribute of the <table> element defines how wide the table will be on the page. width can have a value that is either the exact width of the table (in pixels) or a percentage (50% or 75%) of the current browser width, which can therefore change if the window is resized. If width is specified, the width of the columns within the table can be compressed or expanded to fit the required width. <table border=“1” width=“100%”> //this will cover the length of the window while 50% covers half of the window. Try and apply this in the table created earlier to see the effects(show your Teacher)

Resizing table border The border attribute, which appears immediately inside the opening <table> tag, is the most common attribute of the <table> element. With it, you specify whether border lines are displayed around the table, and if so, how wide the borders should be. The default is border=”1”. border=”0” suppresses the border, just as if you had omitted the border attribute altogether. NB// You can also use CSS to control your border which is more neater. <table border=“10” width=“100%”> (try this out)

Cell Padding & Cell Spacing The cell padding attribute defines the amount of space between the edges of the cells and the content inside a cell. By default, many browsers draw tables with a cell padding of two pixels. <table border=”10” width=”100%” cellpadding=”10”> (add this to table created earlier and show your Teacher) Cell Spacing Cell spacing is similar to cell padding except that it affects the amount of space between cells—that is, the width of the space between the inner and outer lines that make up the table border. The cellspacing attribute in the <table> element affects the spacing for the table. Cell spacing is two pixels by default. <table border=”4” width=”100%” cellpadding=”10” cellspacing=”8”>

Column Widths You also can apply the width attribute to individual cells (<th> or <td>) to indicate the width of columns in a table. (width in % or pixel) <table border=”1” width=”100%”> <caption>Vital Statistics</caption> <tr> <th width=”40%”>Name</th> <th width=”20%”>Height</th> <th width=”20%”>Weight</th> <th width=”20%”>Eye Color</th> </tr> </table>

Other table attributes Cell Color and Alignment Cell Background Colors Border Colors <table border=”10” bordercolorlight=”Red” bordercolordark=”Black” bgcolor=”#ffffff” width=”50%”> Table Alignment <table border=”1” align=”left” width=”70%”> Cell Alignment <td align=”LEFT” valign=”TOP”><img src=”button.gif” alt=”” /></td> <td align=”CENTER” <img src=”button.gif” alt=”” /></td>

Spanning Multiple Rows or Columns The tables you’ve created up to this point all had one value per cell or the occasional empty cell. You also can create cells that span multiple rows or columns within the table. <TITLE> Using Tables and Its Attributes </TITLE>

<BODY> <TABLE border ="1" > <TR> <TH>Student</TH> <TH>COSC 311</TH> <TH>COSC 312</TH> <TH>GPA</TH> </TR> <TH>James Harunna </TH><TD>80</TD> <TD>75</TD> <TD ROWSPAN="3">N/A</TD> <TH>Nwosu Daniel</TH><TD>70</TD> <TD>90</TD> <TH>Destiny Joy</TH><TD COLSPAN="2">Dropped Course</TD> </TABLE> </body>