Tables and Frames.

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

ECA 228 Internet/Intranet Design I
Designing Web Pages Tables part one. Using Tables for Page Layout 2.
Tutorial 5 Working with Web Tables
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
Tutorial 4: Designing a Web Page with Tables
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 4: Designing a Web Page with Tables.
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.
The Power of Tables They aren't just for sitting stuff on anymore...
HTML Code. What we will cover Basic HTML Body Font Images Hyperlinks Tables Frames.
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.
HTML Essentials Tables and Table Tags. Overview Use of Tables goes beyond tabulating data Frequently used to format Web pages / control layout Especially.
XP 1 Tutorial 4 Designing a Web Page with Tables.
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.
XHTML Tables. Tables create little boxes in which you can place things to keep them organized. The little boxes are called table cells. Tables are created.
HTML Comprehensive Concepts and Techniques Second Edition Project 3 Creating Tables in a Web Site.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
Chapter 5 Creating Page Templates
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
Actual Building the Pages Tables. Using Table Elements  To build effective page templates, you must be familiar with the HTML table elements and attributes.
HTML: Tables & Frames Internet Technology1. HTML: Tables Table tags ► surround the entire table ► header row (text is boldfaced) ► surround each row ►
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
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 4 1 New Perspectives on Creating Web Pages with HTML Tutorial 4: Designing a.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
HTML: Tables & Frames Internet Technology.
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
Week 5 Working with Tables. 2 Understanding Table Basics.
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.
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.
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.
Chapter 5 Creating Page Templates. Principles of Web Design 2nd Ed. Chapter 5 2 Principles of Web Design Chapter 5 Objectives Understand table basics.
HTML Tables The HTML table model allows authors to arrange data - text, preformatted text, images, links, forms, form fields, other tables, etc. - into.
Chapter 5 Working with Tables Principles of Web Design, 4 th Edition.
LINKING WEBPAGES USING HTML HYPERLINKS. Hyperlinks are text strings or images on a webpage which when clicked on, links to another section in the same.
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.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
CIS101 Introduction to Computing Week 07 Spring 2004.
Tutorial 5 Working with Web Tables
Designing a Web Page with Tables
CNIT 131 HTML5 - Tables.
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
Working with Tables: Module A: Table Basics
LAB Work 02 MBA 61062: E-Commerce
HTML Tables CS 1150 Spring 2017.
Tutorial 5 Working with Tables and Columns
Chapter 5 Introduction to XHTML: Part 2
Programming the Web using XHTML and JavaScript
Tutorial 5 Working with Web Tables
New Perspectives on Creating Web Pages with HTML
HTML and CSS 8th Edition Chapter 18: Tables.
Using HTML Tables SWBAT: - create tables using HTML
HTML Tables & Frames Internet Technology.
Introduction to HTML.
Site Development Foundations Lesson 6
Lesson 5: HTML Tables.
HTML Tables & Frames Internet Technology.
Presentation transcript:

Tables and Frames

Understanding Table Basics

Using Table Elements To build effective page templates, you must be familiar with the HTML table elements and attributes The <table> element contains the table information, which consists of table row elements <tr> and individual table data cells <td> These are the three elements you will use most frequently when you are building tables

Basic Table Code <table border="1“> <tr><td>Breed</td><td>Description</td><td>Group</td> </tr> <tr><td>French Bulldog</td><td>Loyal Companion</td> <td>Non-Sporting</td></tr> <tr><td>Wheaten Terrier</td><td>High energy, friendly</td> <td>Terrier</td></tr> <tr><td>English Pointer</td><td>Hunting companion</td> <td>Sporting</td></tr> <tr><td>Australian Cattle Dog</td><td>Guarding, herding</td> <td>Working</td></tr> </table>

Caption and Table Header <caption> lets you add a caption to the top or bottom of the table By default, captions display at the top of the table; you can use the align=“bottom” attribute to align the caption at the bottom of the table The <th> tag lets you create a table header cell that presents the cell content as bold and centered

Table Grouping Attributes The primary use of the grouping elements is to let you apply styles to groups of either rows or columns

Defining Table Attributes Table attributes let you further define a number of table characteristics You can apply attributes at three levels of table structure: global, row level, or cell level

Global Table Attributes Affect the entire table

Row-Level Table Attributes Affect the entire row

Cell-Level Table Attributes Affect only the contents of one cell

Spanning Columns The colspan attribute lets you create cells that span multiple columns of a table Column cells always span to the right

Spanning Rows The rowspan attribute lets you create cells that span multiple rows of a table Rows always span down

Formatting Tables

Choosing Relative or Fixed Table Widths Set relative table widths as percentages in the table width attribute If you choose relative table widths, your tables will resize based on the size of the browser window Set absolute table widths as pixel values in the table width attribute Fixed tables remain constant regardless of the browser window size

Determining the Correct Fixed Width for a Table The most common width for page template tables is approximately 975 pixels This width supports the 1024 x 768 screen resolution

Adding White Space in a Table You can add white space into a table with the cellpadding and cellspacing attributes

Removing Default Table Spacing Default spacing values are included in the table even when you don’t specify values for the table’s border, cellpadding, or cellspacing attributes Depending on the browser, approximately two pixels are reserved for each of these values You can remove the default spacing by explicitly stating a zero value for each attribute

Table Pointers for Well-Designed Tables

Table Pointers for Well-Designed Tables Write code that is easy to read Remove extra white spaces Center tables to adapt to different resolutions Stack tables for quicker downloading Avoid nested tables Use Cascading Style Sheets for table styles

Removing Extra Spaces Always remove any leading or trailing spaces in your table cell content These spaces cause problems when you try to join the contents of adjacent cells

Centering Tables Centering a fixed table makes it independent of resolution changes, because the table is always centered in the browser window

Stacking Tables Because of the way browsers display tables, it is better to build several small tables rather than one large one This technique, called stacking tables, also can simplify your table design task, because smaller tables are easier to work with

Avoid Nesting Tables Nesting tables is the practice of placing an entire table within a table cell Nested tables are not accessible to screen readers and other assistive devices This technique is being replaced by newer techniques such as CSS positioning

Creating a Page Template In this example you’ll see how to take a design sketch for a Web page and build a template for the page layout Figure 5-20 shows a sketch of the desired layout This layout is designed for a base screen resolution of 1024 x 768, so the table will be fixed at a width of 975 pixels

Creating a Page Template Notice that the basic structure of the table is three rows by four columns Each column uses 25% of the total width of the template Row spans and column spans break across the layout to provide visual interest

Building the Basic Table Structure Start by building the basic table structure, including all the cells and rows of the table As you customize the table you can remove extraneous cells as necessary The basic structure is a three-row by four-column table

Setting a Fixed Width One of the design characteristics of the template is a fixed width that does not depend on the user’s browser size or screen resolution To create this characteristic, use a pixel value in the table width attribute

Creating the Page Banner Cell The page banner cell is R1C1 This cell spans the four columns of the table using the colspan attribute

Creating the Feature Article Cell The feature article cell in the layout is R2C2, and spans two columns This column span requires the removal of one cell in row two to make room for the span

Creating the Link Column Cells The New Link and Linked Ads columns in the layout reside in cells R2C1 and R2C3 respectively These cells span rows 2 and 3 of the table The row spans require the removal of cells R3C1 and R3C4

Setting the Column Widths Column widths must be set in only one cell per column It’s also best to set the column widths in only one row of the table Setting the column width ensures that the text will wrap properly

Testing the Template To verify that your template works properly, populate it with test content Test the template in multiple browsers

Examples of Page Templates The following templates cover a variety of page layout needs You may choose to stack different templates on top of each other for more complex layouts

Summary Plan your tables by sketching them out first Use fixed table widths if you want to determine the size of your page rather than let the browser determine the width Use relative widths if you want to build tables that resize with the browser window, wrapping your content to fit Write table code that is easy to read, remove extra spaces, and choose whether to center or stack tables Avoid using nested tables and use CSS whenever possible to add presentation style to tables

Summary Work on your pages with the table borders turned on, which displays the cell boundaries When you are finished with your layout, you can turn the borders off Size your tables based on the page size you want to create Use 1024 x 768 as your base screen resolution In most cases you’ll set the width but not the height of your tables, allowing the content to flow down the page

Summary Test your work! Table settings, especially cell widths and heights, can vary based on the user’s browser

Frames

Frameset and Frames The <frameset> element is the container for the frameset code The cols and rows attributes let you specify the characteristics of the frameset You can specify a frameset as either cols or rows, but not both The <frame> element is an empty element The src attribute provides the location of the file that is displayed within the frame

Frameset Syntax (Rows) <frameset rows = “50%,50%”> <frame src = “top.htm”/> <frame src = “bottom.htm”/> </frameset>

Frameset Syntal (Columns) <frameset cols = “150,*”> <frame src = “left.htm”/> <frame src = “right.htm”/> </frameset>

Nested Frameset Syntax <frameset rows = "40,*"> <frame src = "topnav.htm"/> <frameset cols = "20%,80%"> <frame src = "left.htm"/> <frame src = "right.htm"/> </frameset>

Frame Usage No longer effective Must be careful of source html files Must be careful with hyperlink targetting Less flexibility in design Replaced by tables and then by CSS