CHAPTER 10 Formatting Tables and Forms. Using Tables the Right Way  HTML and XHTML have a LOT of tags dedicated to building a table  If you have only.

Slides:



Advertisements
Similar presentations
The Web Wizards Guide to HTML Chapter Six Tables.
Advertisements

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.
Chapter 3 – Web Design Tables & Page Layout
Working with Web Tables
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
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.
Computing Concepts Advanced HTML: Tables and Forms.
Using HTML Tables.
Creating Web Page Forms
Chapter 19 – Macromedia Dreamweaver MX 2004
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.
1 CS428 Web Engineering Lecture 10 Images, Tables, Forms, Border-Radius (CSS – V)
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.
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.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Bayu Priyambadha, S.Kom. for long documents, you can even have links to other locations in that same document  … where ident is a variable for identifying.
Tutorial 6 Creating Tables and CSS Layouts. Objectives Session 6.1 – Create a data table to display and organize data – Modify table properties and layout.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Chapter 12 – Microsoft FrontPage Express Outline 12.1Introduction 12.2Microsoft FrontPage Express.
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.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
1 Macromedia Dreamweaver Outline Introduction Macromedia Dreamweaver Text Styles Images and Links Symbols and Lines Tables Forms Scripting in Dreamweaver.
HTML. Basic HTML HTML document – HTML headings – to HTML paragraphs – HTML links – HTML images –
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 2.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
Unit 5 – HTML Tables Instructor: Brent Presley.
Adobe Dreamweaver CS3 Revealed CHAPTER FIVE: USING HTML TABLES TO LAY OUT A PAGE.
1 Lesson 3 Power Techniques HTML and JavaScript BASICS, 4 th Edition Barksdale / Turner.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Tutorial 5 Working with Tables and Columns
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Tutorial 5 Working with Tables and Columns
CSS Table Properties.
LITTLE BOXES Controlling size of boxes Box model for borders, margin and padding Displaying and hiding boxes.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
Html Tables Basic Table Markup. How Tables are Used For Data Display Tables were originally designed to display and organize tabular data (charts, statistics,
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
Tutorial 5: Tables Session OBJECTIVES Marking row groups Marking column groups Setting the table frame Specifying the table’s internal gridlines.
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.
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.
How To Create HTML Tables. Table Structure General HTML code for a Web Table: table cells table cells.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
1 HTML Tables. 22 Objectives You will be able to Create tables in HTML.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 5: HTML Tables.
CSS Table Styling. Up to this point, as we haven't applied any CSS styling to our tables, our example tables have not been too pleasing to the eye. CSS.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
CSS Layouts: Grouping Elements
Positioning Objects with CSS and Tables
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Cascading Style Sheets (Layout)
Chapter 5 Introduction to XHTML: Part 2
The Internet 10/25/11 XHTML Tables
Fixed Positioning.
Controlling Layout with Style Sheets
For the World Wide Web Styling Tables with CSS
Floating and Positioning
The Internet 10/27/11 XHTML Forms
Lesson 5: HTML Tables.
Positioning Objects with CSS and Tables
Presentation transcript:

CHAPTER 10 Formatting Tables and Forms

Using Tables the Right Way  HTML and XHTML have a LOT of tags dedicated to building a table  If you have only three columns and three rows, you have nine unique HTML tags in operation  Using class identifiers saves a lot of trouble  VISIT: Bring on the TablesBring on the Tables

Styling Tables  Because tables possess several type of tags, you need to know WHICH tags to style  Applying PADDING to a tag has no effect  Apply PADDING to a table header or a table cell. td, th (padding: 10px;)  You can control the padding (spacing) for each edge  If you insert an image in a table cell as a background, and notice unwanted white space, set the image’s display property to “block” Image White Space in a Table

Adjusting Vertical and Horizontal Alignment  To control a content’s position within a table cell, use the text-align and vertical-align properties  text-align controls horizontal positioning left, right, center, and justify  Remember, it is an inherited property  Very handy for the tag as browsers usually center align the text.  Table cells also have a height  browsers usually align content vertically in the middle of a table cell

Vertical-Align Property  The vertical-align property has four values  top, baseline, middle, or bottom top = pushes content to the top of the cell middle = centers content bottom = pushes the bottom of the content to the bottom of the cell baseline = Works like the top property, except the browser aligns the baseline of the first line of text in each cell in a row (great for perfectionists)  The vertical-align property is not inherited

Creating Borders  Applying the border property to a tag, outlines the table, not the individual cells  Applying the border property to a tag, leaves you with a visible gap between the cells (the lines appear as double lines)  To control this issue, you need to understand the tag’s cell spacing attribute and the CSS border-collapse property

Controlling the Space Between Table Cells  Unless instructed, browsers separate table cells by 2px  It is very noticeable when you apply a border to the cell  CSS gives you the border-spacing property to control this, but since IE (all versions) doesn’t support the border-spacing property, use the table’s cell- spacing property.

Border-Collapse Property  Either  Insert spacing  Eliminate spacing table {border-collapse: collapse;}  If you eliminate spacing, the border property doubles up (bottom of one cell with the top of the cell underneath it)  The best option is to use the border-collapse property  Accepts two values: separate and collapse  Collapse eliminates spaces and double borders

Styling Rows and Columns  Adding color to every other row in a table has no magic CSS wand.  You would apply a.class to every other row you wanted to either color or insert an background image.  Adding color or an image to a column is easier, but trickier  Use the or tags one tag for each column in a table and apply either a class or ID only two properties work with these tags, width and background.

Setting a Width  tag groups several columns together  When setting a width to this tag, the browser automatically applies the specified width to each column in the group.  Keep in mind, backgrounds for columns appear under table cells, so if you set a background color for a cell, the table’s background will not be seen

Styling Forms  Forms are one of the primary methods visitors use to interact with a web site.  join a mailing list  search a database of products  update personal profiles  There is no reason your FORM has to appear like all other forms on the web  Unfortunately, results can be mixed as browsers do not support styling for forms in a uniform manner— they vary greatly

Styling True to Form  Changing forms drastically has its disadvantages. Users are familiar with the way forms display buttons, lists, etc.  Changing them too much can cause mistakes and loss of data because the form has not been filled out properly  You may also have to place too many directions on how to fill in the form  Best to stick with what works

HTML Form Elements  fieldset = groups related form questions. Most browsers do a good job of displaying background colors, images and borders for this tag  legend = Provides a label for the group of fields and you can change the color, background and font properties  text fields = input type and create text boxes on a form. You can change font, font-family, and other text properties as well as add backgrounds and borders.

Buttons on a Form  you can set the width property of the tags, but only the obeys the height property.  buttons = allow your visitors to submit a form, reset the contents, or set off another action.  Safari does not allow any changes for the buttons, but all other browsers go wild, allowing alteration of color, background, text formatting, borders, etc. You can even set the text to left, middle, or right using the text- align property.

Drop-Downs and Radio Buttons  Drop-down menus = tag. Safari allows font-family, color, and size. Other browsers allow background color, image, and borders  Checkboxes and Radio Buttons = Most browsers do not allow formatting of these elements. Opera allows a background color that appears inside the box or button.  IE adds background color AROUND the box or button.

Lay Out Forms Using CSS  The easiest approach is with an HTML table  You can format the table with all of the attributes normally attributed to a table  Table lend themselves well to the set up of a form