meow mix...its how i roll
Feb 22, 2009 0:30:52 GMT -5
Part two of me covering HTML...I'm going to insert from a college reference website that I got from a friend.
Tables
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.
Example:
<table border="1">
<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>
</table>
If you do not specify a border attribute the table will be displayed without any borders. Sometimes this can be useful, but most of the time, you want the borders to show.
To display a table with borders, you will have to use the border attribute:
<tabler border='#'> Like headers, borders have a numerical value that specifies how big the border is. 1 being the smallest and 6 being the largest.
Table cells with no content are not displayed very well in most browsers. To avoid this, add a non-breaking space ( ) to empty data cells, to make the borders visible.
Other Table Attributes
Cell Padding <table cellpadding='#'> is used to create more white space between the cell content and its borders.
Cell Spacing <table cellspacing='#'> is used to increase the distance between the cells.
Caption tags <caption></caption> adds a title to your table.
Background Color or bgcolor <table bgcolor='color'> adds a color to the background of the table. You can use word colors or hexidecimal.
Background <table background='imgurl'> adds an image to the background.
(Both Background and BGcolor can be singled to a cell)
The Align Attribute <td align='left/right'> allows you to align the content of your cells to make a "nice-looking" table.
Forms & Input
A form is an area that can contain form elements.
Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.
A form is defined with the <form> tag.
<form>
<input>
<input>
</form>
The most used form tag is the <input> tag. The type of input is specified with the type attribute.
The different types of attributes are...
Text FieldsText fields are used when you want the user to type letters, numbers, etc. in a form.
<form>
First name:
<input type="text" name="firstname">
<br>
Last name:
<input type="text" name="lastname">
</form>
Radio ButtonsRadio Buttons are used when you want the user to select one of a limited number of choices.
[<form>
<input type="radio" name="sex" value="male"> Male
<br>
<input type="radio" name="sex" value="female"> Female
</form>
CheckboxesCheckboxes are used when you want the user to select one or more options of a limited number of choices.
<form>
I have a bike:
<input type="checkbox" name="vehicle" value="Bike">
<br>
I have a car:
<input type="checkbox" name="vehicle" value="Car">
<br>
I have an airplane:
<input type="checkbox" name="vehicle" value="Airplane">
</form>
DropboxesA drop-down box is a selectable list.
<form action="">
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
</form>
You can also form Text Areas and Buttons as well.
Text AreaA user can write text in the text-area. In a text-area you can write an unlimited number of characters.
<textarea rows="10" cols="30">
The cat was playing in the garden.
</textarea>
ButtonOn the button you can define your own text.
<form action="">
<input type="button" value="Hello world!">
</form>
You can head to
w3schools.com to learn more about this subject and many others