Organizing Content with Lists and Tables

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

Designing Web Pages Tables part one. Using Tables for Page Layout 2.
Tutorial 5 Working with Web Tables
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
TABLES 6 How to create tables What information suits tables How to represent complex data in tables.
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
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.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
XP 1 Tutorial 4 Designing a Web Page 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.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and.
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.
>> 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.
Chapter 9 Table Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Tutorial 5 Working with Tables and Columns
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Tutorial 5 Working with Tables and Columns
1 Week Four– Advance HTML 2 Dr. Fadi Safieddine. 2 Lecture Content Basic HTML Tables Using based Feedback form Creating and Using Image Maps Nested.
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.
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.
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything › Text › Lists › Other tables › Pictures › …
 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.
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.
HTML Tables The HTML table model allows authors to arrange data - text, preformatted text, images, links, forms, form fields, other tables, etc. - into.
Internet Technology Dr Jing LU Updated Dr Violet Snell / Dr Kalin Penev 1 Internet Technology (week 6)  Recap: Validating HTML  Page Layout.
How To Create HTML Tables. Table Structure General HTML code for a Web Table: table cells table cells.
CONTROLLING Page layout
Chapter 9 Table Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
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.
Tables.  How tables are used  Basic table structure  Importance of headers  Spanning rows and columns  Cell padding and spacing  Accessibility.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
Tutorial 5 Working with Web Tables
Client-Side Internet and Web Programming
CSE 154 Lecture 17: HTML tables.
Working with Tables: Module A: Table Basics
Elements of HTML Web Design – Sec 3-2
Elements of HTML Web Design – Sec 3-2
Web Development & Design Foundations with HTML5 8th Edition
HTML Tables CS 1150 Spring 2017.
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
HTML Lists CS 1150 Fall 2016.
The Web Warrior Guide to Web Design Technologies
Elements of HTML Web Design – Sec 3-2
Client-Side Internet and Web Programming
How to work with tables Chapter 10.
Chapter 7 Tables.
Chapter 5 - Introduction to XHTML: Part 2
Tutorial 5 Working with Web Tables
Web Design & Development
The Internet 10/25/11 XHTML Tables
HTML and CSS 8th Edition Chapter 18: Tables.
TABLES, LISTS & IMAGES.  Tables are defined with tag.  Table is divided into rows and columns.  Table must have at least one row and one column  Table.
Introduction to XHTML Cont:.
HTML Lists CS 1150 Spring 2017.
Implementing Tables to Hold Data in HTML
Introduction to HTML.
Principles of Web Design 5th Edition
Laying out Elements with CSS
Lesson 5: HTML Tables.
Hypertext Markup Language Table 11th Lecture
Basics of Web Design Chapter 9 Table Basics Key Concepts
Presentation transcript:

Organizing Content with Lists and Tables

Objectives Create an ordered list Create an unordered list Create a description list Create a nav bar using a list HTML 5 and CSS 3 – Illustrated 2e

Objectives (continued) Insert a table Debug tables Span columns and rows Format a table with CSS Apply a table-like structure to other elements HTML 5 and CSS 3 – Illustrated 2e

Create an Ordered List Ordered list: a list in which items are numbered or lettered sequentially ol element: used to create an ordered list li element: used to create each list item Contents of the list item contained between opening and closing <li> tags. All li elements for a list are nested within the opening and closing ol tags HTML 5 and CSS 3 – Illustrated 2e

Create an Ordered List (continued) Default marker for a list item determined by user agent Usually Arabic numerals Can be set using the CSS list-style-type property Possible values include decimal, lower-roman, upper-roman, lower-alpha, and upper-alpha HTML 5 and CSS 3 – Illustrated 2e

Create an Ordered List (continued) Ordered list: code and display HTML 5 and CSS 3 – Illustrated 2e

Create an Unordered List Unordered list: a list in which items have no specific order ul element: used to create an unordered list li element: used to create each list item Structure is the same as an ordered list Default bullet is solid circle Can be set using the CSS list-style-type property HTML 5 and CSS 3 – Illustrated 2e

Create an Unordered List (continued) Unordered list :code and display HTML 5 and CSS 3 – Illustrated 2e

Create a Description List Description list: uses two elements, also called an item-description pair: dt and dd Originally intended for terms and their definitions List defined using the <dl> tag <dt> tag marks item being described; <dd> tag indicates descriptiond A dt can have more than one dd HTML 5 and CSS 3 – Illustrated 2e

Create a Description List (continued) Description list: code and display HTML 5 and CSS 3 – Illustrated 2e

Create a Nav Bar Using a List Sometimes it is good to use a list element to mark up web page content that does not appear as a list e.g., navigation bar Fundamentally a list of related links Marking navigation bar with ul and li elements provides semantic information for user agents HTML 5 and CSS 3 – Illustrated, 2e

Create a Nav Bar Using a List (continued) Nav bar: code and display HTML 5 and CSS 3 – Illustrated, 2e

Insert a Table HTML information can be organized as a table Organizes data in rows and columns Data items displayed in cells HTML elements used to create table: table element: start and end of table th element: content of a header cell td element: content of a data cell tr element: groups cells into rows HTML 5 and CSS 3 – Illustrated, 2e

Insert a Table (continued) Semantic elements used to add information to a table thead element: marks the header rows of a table tbody element: marks the rows that make up the body of the table tfoot element: marks footer rows of the table CSS border property used to set width and/or color of cell or table border HTML 5 and CSS 3 – Illustrated, 2e

Insert a Table (continued) Code for table HTML 5 and CSS 3 – Illustrated, 2e

Insert a Table (continued) Table resulting from code Summary of HTML table structuring elements HTML 5 and CSS 3 – Illustrated, 2e

It is important to debug tables Too many cells can result in protruding cells Too few cells can result in holes Either way, the result is a structure that is not rectangular View your table in a browser to help identify the problems Resist using a table for layout HTML 5 and CSS 3 – Illustrated, 2e

Span Columns and Rows A cell in a table can be formatted to be displayed across multiple rows or columns colspan attribute: used to merge a cell across multiple columns rowspan attribute: used to merge a cell across multiple rows Both attributes are used in the opening th or td tag and receive a number value specifying the number of rows/columns HTML 5 and CSS 3 – Illustrated, 2e

Span Columns and Rows (continued) colspan and rowspan: code and display HTML 5 and CSS 3 – Illustrated, 2e

Format a Table with CSS CSS can be used to style many aspects of tables Used to style font face, font and background colors, and borders around/between cells Can style entire table, table section, individual row or cell CSS border-collapse property can be used to merge adjacent borders into a single line HTML 5 and CSS 3 – Illustrated, 2e

Format a Table with CSS (continued) colgroup and col elements: assign CSS style to column or group of columns Each col element applied to single column starting from left Consecutive columns can be grouped by adding span attribute to col element and specifying number of columns as value If col elements are included, they must cover all columns of the table HTML 5 and CSS 3 – Illustrated, 2e

Format a Table with CSS (continued) Code for styling table

Format a Table with CSS (continued) Table resulting from code HTML 5 and CSS 3 – Illustrated, 2e

Apply a Table-Like Structure to Other Elements HTML tables should be used only for tabular data To make elements that don’t belong in a table look like a grid, use block-level elements Use div to create a structure that parallels that of a table Use CSS to specify that the elements should be treated as components of a table HTML 5 and CSS 3 – Illustrated, 2e

Apply a Table-Like Structure to Other Elements (continued) HTML code for displaying contact information in table-like layout HTML 5 and CSS 3 – Illustrated, 2e

Apply a Table-Like Structure to Other Elements (continued) CSS code for displaying contact information in table-like layout HTML 5 and CSS 3 – Illustrated, 2e

Apply a Table-Like Structure to Other Elements (continued) Contact information displayed in table-like layout HTML 5 and CSS 3 – Illustrated, 2e

Summary Ordered lists, unordered lists, and description lists can be used to organize information in HTML pages Information that does not in and of itself constitute a list can be marked as a list to increase usability of web page List item markers, as well as other list properties, can be set using CSS HTML 5 and CSS 3 – Illustrated, 2e

Summary (continued) HTML information can be organized as a table, in rows, columns, and cells Use table, th, tr, and td HTML elements to create a table Semantic elements can be used to add structural information to a table The rowspan and colspan attributes allow a single cell to span multiple rows or columns

Summary (continued) CSS can be used to apply styling to a table, including styling of fonts, colors, and borders The semantic elements col and colgroup can be used to apply CSS to specific column(s) A table-like structure can be applied to non-table elements using semantic elements, such as div, and CSS It is important to debug your tables