Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

Similar documents
INFS 2150 / 7150 Intro to Web Development / HTML Programming

Deccansoft Software Services

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

ICT IGCSE Practical Revision Presentation Web Authoring

c122sep2214.notebook September 22, 2014

INFS 2150 Introduction to Web Development

Page Layout Using Tables

INFS 2150 Introduction to Web Development

Web Development & Design Foundations with HTML5

IMY 110 Theme 7 HTML Tables

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

HTML-5.com itemscopehttp://data-vocabulary.org/breadcrumb<span itemprop="title">html 5</span> itemscopehttp://data-vocabulary.

Dreamweaver CS3 Concepts and Techniques

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Appendix D CSS Properties and Values

ICT IGCSE Practical Revision Presentation Web Authoring

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

The Importance of the CSS Box Model

HTML and CSS COURSE SYLLABUS

Web Design and Application Development

Chapter 7 Tables and Layout

Chapter 7 Tables and Layout

Assignments (4) Assessment as per Schedule (2)

FLOATING AND POSITIONING

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

Tables & Lists. Organized Data. R. Scott Granneman. Jans Carton

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

Chapter 9 Table Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Table of Contents. MySource Matrix Content Types Manual

EDITOR GUIDE. Button Functions:...2 Inserting Text...4 Inserting Pictures...4 Inserting Tables...8 Inserting Styles...9

Lab Introduction to Cascading Style Sheets

CSS MOCK TEST CSS MOCK TEST III

Certified CSS Designer VS-1028

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Structure Bars. Tag Bar

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container

The most important layout aspects that can be done with tables are:

What is the Box Model?

Styles, Style Sheets, the Box Model and Liquid Layout

Block & Inline Elements

How to lay out a web page with CSS

COMS 359: Interactive Media

USER GUIDE MADCAP FLARE Tables

CSS Selectors. element selectors. .class selectors. #id selectors

Dreamweaver Tutorials Working with Tables

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

Chapter 3 Style Sheets: CSS

Chapter 4 Notes. Creating Tables in a Website

Creating Web Pages with SeaMonkey Composer

COMP519: Web Programming Lecture 4: HTML (Part 3)

Positioning in CSS: There are 5 different ways we can set our position:

To link to an external stylesheet, the link element is placed within the head of the html page:

Introduction to Web Design CSS Reference

HyperText Markup Language/Tables

Introduction to Web Design CSS Reference

Introduction to WEB PROGRAMMING

LING 408/508: Computational Techniques for Linguists. Lecture 14

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

COSC 2206 Internet Tools. CSS Cascading Style Sheets

1 of 7 11/12/2009 9:29 AM

CSS: Cascading Style Sheets

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Chapter 5. Introduction to XHTML: Part 2

HTMLnotesS15.notebook. January 25, 2015

CSS: Lists, Tables and the Box Model

HTML Images - The <img> Tag and the Src Attribute

Create a three column layout using CSS, divs and floating

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

Guidelines for doing the short exercises

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar

ITNP43: HTML Lecture 5

Dreamweaver Basics Outline

Introducing Web Tables

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) More on Relative Linking. Learning Objectives (2 of 2)

Advanced Table Styles

Chapter 7 BMIS335 Web Design & Development

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

How to lay out a web page with CSS

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

CSS THE M\SS1NG MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

CSC 121 Computers and Scientific Thinking

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

COMM 2555 Interactive Digital Communication LAB 4

Adding CSS to your HTML

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

[AVWSQ-ADWCS6]: WSQ ICDL Adobe Dreamweaver CS6

@namespace url( /* set default namespace to HTML */ /* bidi */

COMP 101 Spring 2017 EXAM 2 2 March 2017

Website Development with HTML5, CSS and Bootstrap

CSS Design and Layout Basic Exercise instructions. Today's exercises. Part 1: Arrange Page into Sections. Part 1, details (screenshot below)

CSS Box Model. Cascading Style Sheets

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

5/17/2009. Marking Up with HTML. An HTML Web Page File. Tags for Bold, Italic, and underline. Structuring Documents

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts

Transcription:

Web Design and Development ACS-1809 Chapter 12 Using Tables 11/23/2017 1

Using Tables Understand the concept and uses of tables in web pages Create a basic table structure Format tables within web pages Format content within table cells 11/23/2017 2

Examples of Tables in HTML O X O X O X X O X 11/23/2017 3

Basic Table Structure Example: <table> <tr> <td>cell content</td> <td>cell content</td> </tr> <tr> <td>cell content</td> <td>cell content</td> </tr> </table> 11/23/2017 4

A Simple Table The layout of a graphical table two rows two columns 11/23/2017 5

A simple table <table> <tr> <td> First Cell </td> <td> Second Cell </td> </tr> <tr> <td> Third Cell </td> <td> Fourth Cell </td> </tr> </table> 11/23/2017 6

Table Example 18,953 20,081 22,131 25,112 30,468 984 2,324 6,171 14,781 25,987 11/23/2017 7

Table Headings 11/23/2017 8

Table Headings <table> <tr> <th>heading</th> <th>heading</th> </tr> <tr> <td>cell content</td> <td>cell content</td> </tr> </table> 11/23/2017 9

Adding Table Headings to the Table Text in cells formatted with the <th> tag is bold and centered above each table column Row of table headings 11/23/2017 10

Tables - Summary Table: <table>content</table> Table row: <tr>content</tr> Table cell: <td>content</td> Table heading: <th>content</th> 11/23/2017 11

Images In Tables You can add images to any of the cells Just put an img element inside the cell in which you want to display the image <td><img src="star.gif" width="64" height="64"> </td> 11/23/2017 12

Table Borders Add attribute in the 'table' tag border="value" where value is 1 or 0 1 turns on all the internal and external borders 0 turns off all the borders Style the borders: {border: border-width, border-style, border-color;} table, th, td { border: 1px solid black; } 11/23/2017 13

Border Properties Border-collapse Value: Collapse turn off all the space between the cell borders Separate maintains the space between the cell borders So you can use the border-spacing property to specify the space value table {border-collapse: separate; borderspacing: 10px 5px;} 11/23/2017 14

Spacing Properties You can use padding and margin properties in style sheet on tables Padding and margin for table Only padding for table cells 11/23/2017 15

Defining the Table Size It s a good practice to specify the size of your table The size here is the width and height of the table as measured in pixels or as a percentage of the display area table {width: size ; height: size ;> To create a table whose height is equal to the entire height of the display area, enter the attribute height= 100% If you specify an absolute size for a table in pixels, its size remains constant, regardless of the browser or monitor settings used What if you have multiple tables to style in a single page? 11/23/2017 16

Setting the Width of the Table to 70% of the page width 11/23/2017 17

Defining the Table Size Remember that some monitors may display Web pages at a resolution of 640 by 480 pixels that can be considered as the lowest resolution of today Make sure the page s height is a 100% of the browser window when you set the table height to 100% 11/23/2017 18

More Of Table Properties Like to an image, you can use the float property to be aligned to the right or left of any surrounding text. table {float: right; } You can also style a table with background color table {background-color: #090; } You can even use an image as the background for the table table {background-image: url( star.gif ); } 11/23/2017 19

Caption Add the following tag directly after the <table> tag and before the first <tr> tag <caption >Table Caption</caption> Style the caption in CSS: caption-side : top, bottom, left, right text-align : right, left, center caption { text-align: right; caption-side: bottom; } 11/23/2017 20

Result of a Table Caption A table with caption table caption 11/23/2017 21

Format Content Within Table Cells You can also format the individual table cells You can change vertical and horizontal alignment to the table rows and table cells. tr, td, and th different coverages Text-align: left, right, center, or string (like. for monetary values) td {text-align: center;} Vertical-align: middle, baseline, sub, super, top, bottom,. Width and height You can define the width and height of each cell just like what we did to the entire table This is very useful if you want to have same-size columns Usually just specify the width of the firs column is good enough, with the help from table-layout: fixed; Example: table {table-layout: fixed;} {th {width: 33%;} 11/23/2017 22

Cell Padding To control the space between the table text and the cell borders, you can use the padding property to style the table cell. The syntax for this attribute is: td {padding: value;} value is the distance from the table text to the cell border, as measured in pixels the default cell padding value is 1 pixel To define different padding space on different sides you can use td {padding: 10px 5px;} 11/23/2017 23

Tables with Different Cell Padding Values The effect of changing the cell padding value for a table 11/23/2017 24

Setting the Cell Padding to 4 Pixels A table with an increased amount of cell padding. By increasing the cell padding, you added needed space to the table. 11/23/2017 25

Background Color For A Cell Just like to a table you can set the background color to individual table cells Background color can be used to tr, td, and th as well It can be very helpful to make your table more readable th {background-color: yellow;} 11/23/2017 26

A Table with a Colored Background 11/23/2017 27

Prohibit Line Breaks In case you have content in a table cell that you want to keep in a single line td.nowrap {white-space: nowrap;} <td class= nowrap > This is a long line that won t be wrap</td> 11/23/2017 28

Spanning Cells This cell spans two columns and two rows This cell spans three columns This cell spans three rows 11/23/2017 29

Spanning Rows & Columns In 'th' or 'td' tag rowspan="rvalue" colspan="cvalue" 1 2 3 6 7 8 4 5 9 0 a b c 11/23/2017 30

A Table Structure with a Row-Spanning Cell four table cells in the first row only three table cells are required for the second and third rows HTML code resulting table 11/23/2017 31

HTML Structure of a Table beginning of the table structure table cells first row of five in the table You do not need to indent the <td> tags or place them on separate lines, but you may find it easier to interpret your code if you do so. After the table structure is in place, you re ready to add the text for each cell. end of the table structure 11/23/2017 32

Group Rows Three tags are used to group rows thead tfoot tbody That will make it easier to style each section 11/23/2017 33