Client-Side Internet and Web Programming

Slides:



Advertisements
Similar presentations
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Advertisements

 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.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Introducing Web Tables
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.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Using HTML Tables.
Tables And Lists. Slide 2 Lecture Overview Learn about the basics of tables Create simple 2-dimensional tables Format tables Create tables with complex.
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.
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.
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.
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
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
>> 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.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
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.
 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.
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.
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.
Assistant Professor,UCER Naini,Allahabad
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
Designing a Web Page with Tables
Client-Side Internet and Web Programming
Advanced Tables.
Marking Up with XHTML Tags describe how a web page should look
Organizing Content with Lists and Tables
Internet & Web Engineering Course Code:CS-228 Credit Hours (3+1) Lab 2 HTML TABLES Instructor: Muhammad Zeeshan Haider Ali Blog Address:
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.
Tutorial 5 Working with Tables and Columns
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Programming the Web using XHTML and JavaScript
Chapter 6 Lists.
Chapter 5 Introduction to XHTML: Part 2
Introduction to HTML.
How to work with tables Chapter 10.
Chapter 7 Tables.
Chapter 5 - Introduction to XHTML: Part 2
H T M L A B E S X P I N D.
TABLES.
Using HTML Tables SWBAT: - create tables using HTML
TABLES.
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
HTML Tables & Frames Internet Technology.
Introduction to XHTML Cont:.
Advanced Tables.
Introduction to HTML.
H T M L A B E S X P I N D.
Site Development Foundations Lesson 6
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Lesson 5: HTML Tables.
H T M L A B E S X P I N D.
HTML Tables & Frames Internet Technology.
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

Client-Side Internet and Web Programming Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side Internet and Web Programming LISTs & TABLEs CHAPTER 4 Prepared by: R. Kansoy

Contents 4.1 Lists 4.1.1 Ordered Lists 4.1.2 Unordered Lists 4.1.3 Definition Lists 4.1.4 Nested Lists 4.2 Tables http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1 LISTs HTML supports 3 types of lists: Ordered Lists Unordered Lists Definition Lists Nested Lists Lists may be nested to obtain multiple hierarchy levels http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1.1 Ordered List - <ol> 4.1 LISTs 4.1.1 Ordered List - <ol> Lists whose elements must appear in a certain order Such lists usually have their items prefixed with a number or letter An ordered list starts with the <ol> tag and finishes with </ol> tag. Each list item writtin within the <li>... </li> tags. By default, ordered lists use decimal sequence numbers (1, 2, 3, …) <ol> <li>Apples</li> <li>Bananas</li> <li>Coconuts</li> </ol> Apples Bananas Coconuts http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1.1 Ordered List - <ol> 4.1 LISTs 4.1.1 Ordered List - <ol> To change sequence type, use TYPE attribute in <OL> opening tag; TYPE = “1” (default) – Decimal sequence (1, 2, 3, …) TYPE = “I” – Uppercase Roman numerals (I, II, III, …) TYPE = “i” – Lowercase Roman numerals (i, ii, iii, …) TYPE = “A” – Uppercase alphabetical (A, B, C, …) TYPE = “a” – Lowercase alphabetical (a, b, c, …) <ol type=“a”> <li>Apples</li> <li>Bananas</li> <li>Coconuts</li> </ol> a. Apples b. Bananas c. Coconuts http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1.2 Unordered List - <ul> 4.1 LISTs 4.1.2 Unordered List - <ul> Lists whose elements do not have to appear in a certain order. An unordered list starts with the <ul> tag and finishes with </ul> tag. Each list item written within the <li>...</li> tags. The list items are marked with bullets (typically small black discs). <ul> <li>Apples</li> <li>Bananas</li> <li>Coconuts</li> </ul> Apples Bananas Coconuts http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1.2 Unordered List - <ul> 4.1 LISTs 4.1.2 Unordered List - <ul> To change the type of a an unordered list, use TYPE attribute in <OL> opening tag; TYPE = “disc” (default) – TYPE = “circle” – TYPE = “square” – <ul type=”square”> <li>Apples</li> <li>Bananas</li> <li>Coconuts</li> </ul> Apples Bananas Coconuts http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1.3 Definition List - <dl> 4.1 LISTs 4.1.3 Definition List - <dl> A definition list is a list of items, with a description of each item. More complex than the other 2 lists due to their having 2 elements per list item <dl> tag defines a definition list. <dt> defines the item in the list. <dd> describes the item in the list. http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1.3 Definition List - <dl> 4.1 LISTs 4.1.3 Definition List - <dl> <dl> <dt>Internet Explorer</dt> <dd>Developed by Microsoft</dd> <dt>Netscape</dt> <dd>Developed by Netscape</dd> </dl> Internet Explorer Developed by Microsoft Netscape Developed by Netscape http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.1 LISTs 4.1.4 Nested Lists Contained in another list element Lists can be nested of the same or different types Nesting the new list inside the original; Indents list one level and changes the bullet type to reflect the Nesting Send us a letter, including: Your full name Your order number You contact information Use the web form to send an email <ul> <li>Send us a letter, including:</li> <ol> <li>Your full name</li> <li>Your order number</li> <li>Your contact information</li> </ol> <li> Use the web form to send an email </li> </ul> http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs Tables are used when you need to show "tabular data" i.e. information that is logically presented in rows and columns. Building tables in HTML may at first seem complicated but if you keep cool and watch your step, it is actually strictly logical - just like everything else in HTML. All tags and text that apply to the table go inside <TABLE>…</TABLE> tags TABLE Attributes; BORDER: lets you set the width of the table’s border in pixels ALIGN: specifies the horizontal alignment of the content in the entire table, in a row or in a single cell. For example, left, center or right. WIDTH: pixels (absolute) or a percentage VALIGN: specifies the vertical alignment of the content in a cell. For example, top, middle or bottom. http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs CAPTION element is inserted directly above the table in the browser window Helps text-based browsers interpret table data TABLE Elements THEAD element Header info For example, titles of table and column headers TBODY element Used for formatting and grouping purposes http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs A table is divided into rows Each row is divided into data cells <TR>…</TR>   stands for "table row" starts and ends horizontal rows. <TH>…</TH> suitable for titles and column headings used in the header part of a table. all major browsers will display the text in the <th> element as bold and centered. http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs <TD>...</TD> stands for "table data". starts and ends each cell in the rows of the table. holds the content of a data cell. used in the body part of a table. aligned left by default. a <td> tag can contain text, links, images, lists, forms, other tables, etc. http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs Possible to make some data cells larger than others Cells can be merged with the rowspan and colspan attributes The values of these attributes specify the number of rows or columns occupied by the cell Can be placed inside any data cell or table header cell Modified cells will cover the areas of other cells Reduces number of cells in that row or column http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs <html> <body> <h4>Horizontal Headers:</h4> <table border="1"> <tr> <th>Name</th> <th>Telephone</th> </tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </table> </body> </html> Horizontal Headers: Name Telephone Bill Gates 555 77 854 555 77 855 http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs <html> <body> <h4>Vertical Headers:</h4> <table border="1"> <tr> <th>First Name:</th> <td>Bill Gates</td> </tr> <th>Telephone:</th> <td>555 77 854</td> <td>555 77 855</td> </table> </body> </html> Vertical Headers: First Name: Bill Gates Telephone: 555 77 854 555 77 855 http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs <table border="1"> <caption> TABLE 1 </caption> <THEAD> <tr> <th>Header 1</th> <th>Header 2</th> </tr> </THEAD> <TBODY> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </TBODY> </table> TABLE 1 Header 1 Header 2 row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs Name Telephone Bill Gates 555 77 854 555 77 855 First Name: <html> <body> <h4>Cell that spans two columns:</h4> <table border="1"> <tr><th>Name</th> <th colspan="2">Telephone</th></tr> <tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </tr> </table> <h4>Cell that spans two rows:</h4> <tr><th>First Name:</th><td>Bill Gates</td></tr> <tr><th rowspan="2">Telephone:</th> <tr><td>555 77 855</td></tr> </body> </html> Cell that spans two columns: Name Telephone Bill Gates 555 77 854 555 77 855 Cell that spans two rows: First Name: Bill Gates Telephone: 555 77 854 555 77 855 http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs COLGROUP element Used to group and format columns Each COL element In the <COLGROUP>…</COLGROUP> tag Can format any number of columns (specified by the SPAN attribute) Background color or image Add to any row or cell Use BGCOLOR and BACKGROUND attributes http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

4.2 TABLEs http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229

Thank You ! END of CHAPTER 4 LISTs & TABLEs http://staff.emu.edu.tr/raygankansoy/en/teaching/itec229