Programming the Web using XHTML and JavaScript

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 © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
CS134 Web Design & Development Attributes, Lists, Tables, Links, and Images Mehmud Abliz.
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
Cos 125 Day 22. Agenda Assignment 6 Not corrected Waiting for tune-ins Assignment 7 is posted Assignment 7 Due April 2PM Left to do 1 Assignments.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Cos 125 Day 24. Agenda All students meeting 7 Pm Monday, April 19 UMS Strategic Plan Assignment #7 Posted Due April 20 Two (one?) more to go Quiz Four.
Web-based Application Development Lecture 5 January 24, 2006 Anita Raja.
Web-based Application Development Lecture 6 January 26, 2006 Anita Raja.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
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 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.
CS105 Introduction to Computer Concepts HTML
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, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit F Working with Tables.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… HTML Lists, Tables and Forms v2.0.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 2.
Unit 1 Changing the Appearance of Text. TITLE CORNELL NOTES TOPIC: NOTES: Summary: HTML Hypertext Markup Language 1 st and last tag on a page Tags Tags.
>> 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.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
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.
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.
ATTRIBUTES, LISTS, AND TABLES. Chapter 4 Objectives Extensions Strict vs. transitional XHTML Tag options Structure lists Table data.
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.
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.
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.
Using Tables for Layout INP150 Session #8. Layout Map out your page Design with paper and pencil Determine number of rows and columns you need Determine.
Introduction to Web Authoring Ellen Cushman /wra210.htm Class mtg. #2.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
HTML AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
Designing a Web Page with Tables
Client-Side Internet and Web Programming
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Marking Up with XHTML Tags describe how a web page should look
Organizing Content with Lists and Tables
Web Development & Design Foundations with HTML5
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
LAB Work 02 MBA 61062: E-Commerce
HTML Tables.
Chapter 5 Introduction to XHTML: Part 2
Introduction to HTML.
Client-Side Internet and Web Programming
Chapter 7 Tables.
H T M L A B E S X P I N D.
Web Design & Development
The Internet 10/25/11 XHTML Tables
HTML and CSS 8th Edition Chapter 18: Tables.
TABLES.
Creating Tables in HTML
Introduction to XHTML Cont:.
Web Development & Design Foundations with H T M L 5
Introduction to HTML.
Web Development & Design Foundations with HTML5
H T M L A B E S X P I N D.
Site Development Foundations Lesson 6
Basic HTML.
Lesson 5: HTML Tables.
H T M L A B E S X P I N D.
Web Development & Design Foundations with HTML5
Presentation transcript:

Programming the Web using XHTML and JavaScript Chapter 4 Attributes, Lists, and Tables

Extensions and Deprecation

Extensions and Deprecations Extensions – features not found in “standard” HTML Too often NN’s extensions don’t work in IE IE’s extensions don’t work in NN Therefore, be careful about non-standard features Official features listed at www.w3c.org

Extensions and Deprecations Deprecated – feature being phased out May need to work in “older” browser versions but eventually will cease to be supported Obsolete – features that are not supported by browsers in strict compliance with W3C standards

Extensions and Deprecations At www.w3c.org Naviate to http://www.w3.org/TR/1999/REC-html401-19991224/ http://www.w3.org/TR/html401/appendix/changes.html#h-A.3.1.2 Index Deprecated Obsolete Changes http://www.w3.org/TR/1999/REC-html401-19991224/appendix/changes.html Deprecated Elements

Extensions and Deprecations Forms (levels) of XHTML (see p. 85) Strict Does not recognize deprecated elements Transitional Recognizes deprecated elements Which should you use? Transitional! Otherwise older browsers might not display your pages well

Extensions and Deprecations <font> vs. <style> <font> is deprecated <style> is not Which would be preferable for making changes to an entire document?

Tags and Attributes

Tags and Attributes Styles have properties <style type=“text/css”> h2 {text-align:center} </style> Element attributes have values <font align=“center”> … </font> Colon andNo quotation marks Equals andQuotation marks

<font size=“5” color=“red” face=“Arial”> Tags and Attributes <font> size= “1” to “7” (smallest to largest) color= “red”, “blue”, etc. face= “Arial”, “Courier”, etc. <font size=“5” color=“red” face=“Arial”>

Tags and Attributes Alignment = “left”, “center”, “right” Using tags: <h2 align=“center”> <p align=“right”> Centering <center>this text is centered</center>

Tags and Attributes Preferred method using styles: <style type=“text/css”> h2 {text-align:center} p {text-align:center} </style>

Tags and Attributes Background colors Using tags: <body> tag bgcolor and text attributes Using tags: <body bgcolor=“yellow” text=“blue”>

Tags and Attributes Using styles in the body: <style type=“text/css”> body {background-color:yellow; color:blue} </style>

Note! Both commands change the text displayed to yellow on a blue background <body bgcolor=“yellow” text=“blue”> <style type=“text/css”> body {background-color:yellow; color:blue} </style> The names for the same attribute to change is different! Aside: changing background-color property in the style sheet for the body tag does NOT change the bgcolor attribute in the <body> tag

Tags and Attributes Horizontal Rules Using tags: Using styles: <hr size=“7” width=“75%” /> Ch04-Ex-01a Using styles: <style type=“text/css”> hr {height:7px; width:75%; background-color:red} </style> Ch04-Ex-01b

Lists

Displaying Lists Ordered: 1. Item 1 2. Item 2 Unordered: Item 1 Item 2

Displaying Lists Ordered lists: Block-level element <ol> <li> Item 1 </li> <li> Item 2 </li> </ol> Block-level element Items indented relative to other text Ch04-Ex-02 Optional in HTML, Required in XHTML

Displaying Lists Unordered lists: Block-level element <ul> <li> Item 1 </li> <li> Item 2 </li> </ul> Block-level element Items indented relative to other text Ch04-Ex-03 Optional in HTML, Required in XHTML

Displaying Lists <ul> <li>…</li> Nesting <ul> Ch04-Ex-04 <ul> <li>…</li> </ul>

Displaying Lists <ul> <li>…</li> Nesting <ol> Ch04-Ex-04a <ul> <li>…</li> </ul>

Displaying Lists Customizing list displays Add a “type” attribute to <ul> tag Values may be “disc”, “circle”, or “square” <ul type=“square”> … </ul>

Displaying Lists “type” is a deprecated attribute so… <style type=“text/css”> ul {list-style:square} </style>

Displaying Lists Definition lists Ch04-Ex-05 <dl> <dt> term </dt> <dd>definition</dd> </dl> Ch04-Ex-05

Tables

Tables One or more rows, each divided into … One or more “cells” containing data <table> <tr> <td>…</td> </tr> </table> Repeat for each row in table Repeat for each cell in row

<table border=“4”> Tables Initially, table borders are invisible unless the “border” attribute is included <table border> or <table border=“4”> Ch04-Ex-06

Tables In cells where each row has the same number of columns … Each cell in a column is as wide as the widest cell in that column Text within cells is automatically aligned to the left

Tables Table headers Table captions <th> & </th> replace <td> & </td> Makes data bold and centered Ch04-Ex-07 Table captions <caption> … </caption> Within the <table> … </table> structure Book is in error! Can place title before or after or on the left or right of the table with the align attribute Default is on top Ch04-Ex-08 Note differences between I.E and FireFox!

Tables Alignment In <td> tag … Horizontal alignment: align=“left” (center, right) Vertical alignment: valign=“top” (middle, bottom) <td align=“center” valign=“top”>

Tables Padding Spacing <table cellpadding=“3” cellspacing=“5”> White space between cell edges and text Ch04-Ex-09 Spacing Width of dividers between cells Ch04-Ex-10 <table cellpadding=“3” cellspacing=“5”>

Tables Table width – legitimate use Cell width – deprecated <td width=“75”>

Tables Cells spanning multiple columns Cells spanning multiple rows Ch04-Ex-11 <td colspan=“2”> Cells spanning multiple rows Ch04-Ex-12 <td rowspan=“3”>

Tables Interesting special use table tags: thead tbody tfoot Use where large (long) tables will likely be printed thead and tfoot information repeated on printed pages only!

Tables <thead> <tbody> <tfoot> Optional tags Header information to be printed at the top of the table for each page over the table contents <tbody> Main part of table (the data) <tfoot> Bottom of the table information to be printed at the bottom of the page and at the end of the main table Optional tags For long tables thead and tfoot information is repeated for printing of tables that span multiple printed pages Has no impact on browser display Ch04-Ex-13.html

Assignment ptw04 Grade based on: See Assignments Web Page Grade based on: Appearance Technical correctness of code Note: the chapter 5 assignment will be based on this file