CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr

Slides:



Advertisements
Similar presentations
Using HTML Tables Presenting Information & Layout Control.
Advertisements

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.
Chapter 3 – Web Design Tables & Page Layout
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.
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.
Using HTML Tables.
1 Tables: Data in Rows and Columns – What is Table? – How Tables are Used? – Designing Tables – Table, Cell, Row Attributes – Using Tables for Alignment.
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
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.
 Tables are commonly used to display all manner of data, such as timetables, financial reports, and sports results etc.  Tables, just like spreadsheets,
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.
Tables in HTML Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
XP 1 Tutorial 4 Designing a Web Page with Tables.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorial 5: Working with Tables.
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.
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 2.
>> 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.
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
HTML B OOT C AMP Chapter 10 Tables Kirkwood Continuing Education © Copyright 2015, Fred McClurg All Rights Reserved.
Tutorial 5 Working with Tables and Columns
Web Development & Design Foundations with XHTML Chapter 8 Key Concepts.
Tutorial 5 Working with Tables and Columns
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
A table is a rectangular arrangement of rows and columns on your screen A table is used to organize data into rows and columns and also increasingly.
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.
ECA 228 Internet/Intranet Design I Tables. ECA 228 Internet/Intranet Design I Basic HTML Tables Created as a way to present rows and clumns of data.
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.
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.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
TABLES. Session Checklist ► Learn the ways that tables can help you organize data on your Web site ► Learn how to prepare a spreadsheet-like table that.
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.
HTML Tables. Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag).
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 CS 1150 Spring 2017.
HTML Tables.
Tutorial 5 Working with Tables and Columns
Introduction to HTML.
Chapter 7 Tables.
H T M L A B E S X P I N D.
TABLES.
Using HTML Tables SWBAT: - create tables using HTML
TABLES.
Web Design and Development
Creating Tables in HTML
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
H T M L A B E S X P I N D.
Site Development Foundations Lesson 6
Lesson 5: HTML Tables.
Hypertext Markup Language Table 11th Lecture
Web Development & Design Foundations with HTML5
Basics of Web Design Chapter 9 Table Basics Key Concepts
Presentation transcript:

CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr. Tehseen Riaz Abbasi

Web Technologies and Programming Lecture 09

grgf Tables in HTML

Summary of the previous lecture Adding images to web page Using images as links Image map Adding video to web page Adding audio o web page

Outline How to create tables Page lay-out using tables

1. Creating HTML tables Tables display information in rows and columns Tables are commonly used to display all manner of data that fits in a grid such as train schedules, television listings, financial reports etc.

1. Creating HTML tables An HTML table consists of the <table> element and one or more elements like <tr> <th> <td> Tables are divided into table rows with the <tr> tag. Table rows are divided into table data with the <td> tag. A table row can also be divided into table headings with the <th> tag.

1. Creating HTML tables… In HTML <table> tag is used to start a table while </table> tag indicates the end of the table <table> Table Structure </table> <tr> tag starts a row of the table and </tr> ends the row <td> is used to create a cell inside the row while </td> ends the cell

1. Creating HTML tables… The contents of the cell are written between <td> and </td> tags <th> tag is used to declare the cell of the heading row of the table

An HTML Table with a Border Attribute 1. Creating HTML tables… An HTML Table with a Border Attribute If you do not specify a border for the table, it will be displayed without borders. A border can be added using the border attribute: <table border="1“>

1. Creating HTML tables… <table border=“1”> <tr> <td> Name </td> <td> Registration No. </td> </tr> <td>Ali</td> <td>FA13-BCS-001</td> </table> Name Registration No. Ali FA13-BCS-001

1. Creating HTML tables…

1. Creating HTML tables…

1.1 Table Attributes Table level attributes Row level attributes Cell level attributes

1.1.1 Table Attributes The Border Attribute: Indicates the presence of the border around the table <table border=“1”> The align Attribute: <table align= “center”> Other values for align are Center Left right

1.1.1 Table Attributes The bgcolor Attribute: sets the background color of the table <table bgcolor=“gray”> The background Attribute: sets the specified image at the background of the table <table background=“image-title”>

1.1.1 Table Attributes… The height and width Attributes: The cellpadding Attribute: The cell padding attribute is used to create a gap between the edges of a cell and its contents <table cellpadding=“50”>

The height and width Attributes: The cellspacing Attribute: 1.1.1 Table Attributes… The height and width Attributes: The cellspacing Attribute: The cellspacing attribute is used to create a space between the borders of each cell

1.1.1 Table Attributes…

1.1.1 Table Attributes… cell spacing cell padding Height Width

1.1.1 Table Attributes… Differences Between HTML 4.01 and HTML5 The "align", "bgcolor", "cellpadding", "cellspacing", "frame", "rules", "summary", and "width" attributes are not supported in HTML5.

1.1.2 Row level attributes The align Attribute: Aligns content of the row <tr align=“center, right or left”> The bgcolor Attribute: Apply background color to row <tr bgcolor=“gray”> The background Attribute: Adds image as the background of row <tr background=“image-name”>

1.1.2 Row level attributes The height Attributes: Change height on table row <tr height=“20” > The width Attributes: Change width of the row <tr widht=“20”> The valign Attributes: Changes row vertical alignment <tr valign=“top, middle or bottom”>

1.1.2 Row level attributes…

1.1.2 Row level attributes… Vertical Align Row Height

1.1.3 Cell level attributes The align Attribute: <td align=“center, right or left”> The bgcolor Attribute: The height and width Attributes: The valign Attributes:

1.1.3 Cell level attributes The rowspan Attributes: used when a cell should span across more than one rows The colspan Attribute: used when a cell should span across more than one column

1.1.3 Cell level attributes… <table border=“1”> <tr> <td rowspan=“2”>Name</td> <td colspan=“2”>Subjects</td> </tr> <td >OOP</td> <td >DB</td> <td >ALi</td> <td >75</td> <td >80</td> </table> Name Subjects OOP DB ALi 75 80

An HTML Table With a Caption 1.2 Creating HTML tables Caption An HTML Table With a Caption To add a caption to a table, use the <caption> tag:

1.2 Adding caption to the table <caption> tag is used to add a caption of the table We usually add caption before the first row of the table

An HTML Table With a Caption 1.2 Creating HTML table caption An HTML Table With a Caption To add a caption to a table, use the <caption> tag:

1.2 Creating HTML tables Caption Example <table style="width:100%">   <caption>Monthly savings</caption>   <tr>     <th>Month</th>   </tr>   <tr>     <td>January</td>   </tr>   </table>

1.2 Adding caption to the table…

1.2 Adding caption to the table…

A Special Style for One Table 1.3 Creating HTML tables - id attribute A Special Style for One Table To define a special style for a special table, add an id attribute to the table:

A Special Style for One Table Example 1.3 Creating HTML tables - id attribute A Special Style for One Table Example <table id="t01">   <tr>     <th>Firstname</th>     <th>Lastname</th>      <th>Points</th>   </tr>   <tr>     <td>Eve</td>     <td>Jackson</td>      <td>94</td>   </tr> </table>

2. Page Layout using Tables We can use tables to define the structure of the web page

2. Page Layout using Tables Header Links Body Footer

Example: Step 1 (Structure of the page) 2. Page Layout using Tables… Header Footer Body and links Example: Step 1 (Structure of the page)

Example: Step 1 (Structure of the page) 2. Page Layout using Tables… Example: Step 1 (Structure of the page)

Example: Step 2 (Header section) 2. Page Layout using Tables… Example: Step 2 (Header section) Adding Logo Title

Example: Step 2 (Header section) 1.5. Page Layout using Tables… Example: Step 2 (Header section)

Example: Step 3 (Links section) 2. Page Layout using Tables… Links table Example: Step 3 (Links section)

Example: Step 3 (Links section) 2. Page Layout using Tables… Example: Step 3 (Links section)

Example: Step 4 (body section) 2. Page Layout using Tables… Example: Step 4 (body section)

Example: Step 5 (footer section) 2. Page Layout using Tables… Footer Example: Step 5 (footer section)

Example: Step 5 (footer section) 2. Page Layout using Tables… Example: Step 5 (footer section)

Use the HTML <table> element to define a table Summary Use the HTML <table> element to define a table Use the HTML <tr> element to define a table row Use the HTML <td> element to define a table data Use the HTML <th> element to define a table heading Use the HTML <caption> element to define a table caption Use the CSS border property to define a border Use the CSS padding property to add padding to cells Use the CSS text-align property to align cell text Use the CSS border-spacing property to set the spacing between cells Use the colspan attribute to make a cell span many columns Use the rowspan attribute to make a cell span many rows Use the id attribute to uniquely define one table

Summary Creating tables in HTML Table attributes Table level attributes Row level attributes Cell level attributes Page lay-out using tables

THANK YOU