Tables and Forms




CS174

Chris Pollett

Sep 8, 2010

Outline

More HTML tags (Inline tags)

XHTML Entities

Introduction to Tables

Example:

<table border="1" summary="This is a table of how grades will be broken down">
	<caption>grade table</caption>
		<tr><th></th><th>Item</th><th>Value</th></tr>
        <tr><th>1.</th><td>Homeworks</td><td>50%</td></tr>
        <tr><th>2.</th><td>Exams</td><td>50%</td></tr>
</table>

Tables and Accessibility

More on Tables

You can make table headings or table data span more than one column or more than one row using colspan, rowspan:

<tr><th colspan="3">heading</th></tr>


<!-- if we have two levels of heading-->

<tr><th colspan="2">heading</th></tr>
<tr><th>subhead1</th><th>subhead2</th></tr>
<tr><td>1</td><td>2</td><td>3</td></tr>

Controlling width

Still More on Tables

Cellpadding, cellspacing

Forms

Possible methods

Labels and Controls

select tags

<textarea>