LESSON Extension Module 2: HTML Basics Tables.

Slides:



Advertisements
Similar presentations
HTML TABLES EXPLAINED. What is a TABLE? The HTML table allows web designers to arrange & organize data -- text, images, hyperlinks, forms, form fields,
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.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Internet Basics & Way Beyond!
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 Table1.html 1 2
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.
Introducing Web 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.
Images and Tables. Displaying Image Attributes: SRC= " mypic.gif " – Name of the picture file SRC= " pic/mygif.jpg " – Name of file found in pic directory.
What is a TABLE? The HTML table allows web designers to arrange & organize data -- text, images, hyperlinks, forms, form fields, other tables, etc. Tables.
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.
Using HTML to Create Tables in Web pages Connie Lindsey November 2005.
HTML Essentials Tables and Table Tags. Overview Use of Tables goes beyond tabulating data Frequently used to format Web pages / control layout Especially.
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.
HTML Comprehensive Concepts and Techniques Second Edition Creating Tables in a Web Site October 23, 2012.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit F Working with Tables.
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
More Basic XHTML Module 2: XHTML Basics LESSON 2.
Tables Module 2: HTML Basics LESSON Extension. Module 2: HTML Basics LESSON Extension Lesson Overview In this lesson, you will learn to:  Create tables.
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.
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.
Kevin Murphy Introduction to Tables Masters Project CS 490.
Tables Web Authoring. This kind of a table THISIs aTABLE THISIs aTABLE THISIs aTABLE THISIs aTABLE.
Tables in HTML. Table Tag HTML tables always begin and end with a table tag. Syntax:
Basic Table Elements. 2 Objectives Define table elements Describe the steps used to plan, design, and code a table Create a borderless table with text.
 2003 Prentice Hall, Inc. All rights reserved. Introduction to HTML: Tables Outline 1 Introduction 2 Basic HTML Tables 3 Intermediate HTML Tables and.
Tables lab5. Drawing a table Tables are the web designer’s best friend and worst enemy. To draw a table we will use:  tag  for raw  tags for column.
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.
How To Create HTML Tables. Table Structure General HTML code for a Web Table: table cells table cells.
Creating Tables in a Web Site HTML 4 Created by S. Cox.
REEM ALMOTIRI Information Technology Department Majmaah University.
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 5: HTML Tables.
TABLES IN HTML No, not that kind of table!! THIS KIND!!
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.
Tutorial 5 Working with Web Tables
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
LESSON 2 Module 2: XHTML Basics More Basic XHTML.
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
>> HTML: Tables.
LAB Work 02 MBA 61062: E-Commerce
HTML Tables.
Tutorial 5 Working with Tables and Columns
Programming the Web using XHTML and JavaScript
H T M L A B E S X P I N D.
Tutorial 5 Working with Web Tables
Tables:.
TABLES.
HTML/XML HTML Authoring.
TABLES.
TABLES IN HTML No, not that kind of table!! THIS KIND!!
Creating Tables in HTML
Basic Tables.
Creating Tables in HTML
HTML Tables & Frames Internet Technology.
LESSON 2 Module 2: XHTML Basics More Basic XHTML.
Basic Tables.
H T M L A B E S X P I N D.
Basic Tables.
Site Development Foundations Lesson 6
Basic HTML.
Lesson 5: HTML Tables.
H T M L A B E S X P I N D.
HTML Tables & Frames Internet Technology.
Presentation transcript:

LESSON Extension Module 2: HTML Basics Tables

Lesson Overview In this lesson, you will learn to: Create tables using HTML code. Format a Web page using tables. Lesson Extension Overview

Guiding Question for Lesson Extension Describe a situation in which Web content could be organized using a table. Post the question in an area where students can read the question and allow time for students to respond to the question. Discuss the student answers the question.

Tables Easy to present data by arranging it into columns and rows. Tags needed: <table>…</table> begins and ends a table <tr>….</tr> defines a table row <td>…</td> defines data (content) for the row Modern WYSIWYG Web design environments can use layers in addition to tables to organize information. Discuss how to use tables. Tables make it easy to present data by arranging it into columns and rows. To create a table within a Web page, several HTML tags are needed. First, a <table>…</table> tag identifies the beginning and ending of the table material. Each row of the table is defined by a <tr>…</tr> tag. Each piece of data that is placed into the row is further identified by a <td>…</td> tag.

Example of code creating a table: <tr> <td>one</td> <td>two</td> <td>three</td> </tr> </table> A very simple one row and three column table might be created by using the following HTML code: <table> <tr> <td>one</td> <td>two</td> <td>three</td> </tr> </table>

Creating a border around the table A border attribute can be added to the table<table> tag The width of the border is defined by an integer A border with a medium sized border (3) would look like this: <table border=3> <tr> <td>one</td> <td>two</td> <td>three</td> </tr> </table> To create a border around the table, use the border attribute with the table tag. The width of the border can be defined by using an integer with the border. Adding a medium sized border (3) to the previous example would look like this: <table border=3> <tr> <td>one</td> <td>two</td> <td>three</td> </tr> </table>

Creating a Heading Use the table heading <th> tag to identify the heading words Heading will be bold and centered of the top of each column Adding a heading to our previous example would look like this: <table border=3> <th>Dogs</th> <th>Cats</th> <th>Monkeys</th> <tr> <td>one</td> <td>two</td> <td>three</td> </tr> </table> To create a heading in the table, use the heading tag before the table data. This will place a bold and centered heading at the top of each column. Adding a heading to the previous example would look like this: <table border=3> <th>Dogs</th> <th>Cats</th> <th>Monkeys</th> <tr> <td>one</td> <td>two</td> <td>three</td> </tr> </table> 7

Horizontal Alignment Add the align (align=position) attribute to the table data <td> tag Position can be left, right, or centered Adding horizontal alignment to the previous example would look like this: <table border=3> <th>Dogs</th> <th>Cats</th> <th>Monkeys</th> <tr> <td align=center>one</td> <td align=center>two</td> <td align=center>three</td> </tr> </table> Horizontal alignment can be created by adding the align (align=position) attribute to the table data tag. Horizontal alignment can be left, right, or centered. Adding a centered horizontal alignment to our previous example would look like this: <table border=3> <th>Dogs</th> <th>Cats</th> <th>Monkeys</th> <tr> <td align=center>one</td> <td align=center>two</td> <td align=center>three</td> </tr> </table> 8

Vertical Alignment Similar to horizontal alignment. Add the attribute valign=position to the table data <td> tag. The valign position can be top, bottom, or middle Will only be apparent when a table cell spans two or more rows. Vertical alignment is very similar to horizontal. The attribute (valign=position) is added to the table data tag. Vertical alignment can be top, bottom, or middle. Vertical alignment will only be visible when a table has a cell that spans two or more rows. 9

Creating a larger cell within a table A single cell can span more than one row or column. Attributes can be added to the table data <td> tag. Use rowspan=integer attribute to span a cell vertically across several rows. Use colspan=integer attribute to span a cell horizontally across several columns. This example combines the attributes of rowspan and valign attributes. Write the table data code for the one cell in this example. At times, a cell that spans more than one row or column may be needed. In these cases, attributes can be added to the table data tag to create this situation. A rowspan=integer will create a cell that spans horizontally across a certain number of rows. A colspan=integer will create a cell that spans horizontally across a number of columns. Answer the “Write the table data code for the one cell in this example.”: <td align=center valign=top rowspan=2>one</td> 10

Table Width Defines how far across the Web page the table will extend Use width=x% attribute with the table <table> tag To have the “one two three” table extend across 50 percent of the Web page, create the following code: <table border=3 align=center width=50%> <th>Dogs</th> <th>Cats</th> <th>Monkeys</th> <tr> <td align=center>one</td> <td align=center>two</td> <td align=center>three</td> </tr> </table> It is also possible to define how far across the Web page the table will extend. Using a width=x% attribute with the table tag will give this result. To have our “one two three” table to extend across half of the Web page, add width=”50%” to the table tag. Our new table code would look like this: <table border=3 align=center width=50%> <th>Dogs</th> <th>Cats</th> <th>Monkeys</th> <tr> <td align=center>one</td> <td align=center>two</td> <td align=center>three</td> </tr> </table> 11

Lesson Review Describe the result of the following HTML: <td align=right rowspan=2>145</td> <table border=5 width=100%>…</table> <th>Student</th><th>Locker Number</th><th>Class</th> <td colspan=3><b>Senior Class Schedule</b></td> Review concepts covered if needed with the students and discuss the practice activity. The number 145 will be on the right side of a cell that is two rows wide. Creates a table with a border of 5 and fills the Web page. Create three column headings – Student, Locker Number, and Class. The words Senior Class Schedule will be bolded on the left side of a cell that extends across 3 columns.

Practice: Tables Create a table in your “Tags and Attributes” Web page that includes the following: A wide border (5) One cell that spans two columns Headings for each column Each cells horizontally center aligned Challenge Activity: Change the color of the text in the cells. This is the last slide of the presentation.