reading-notes

Software Development Reading Notes

View on GitHub

Forms

Lists, Tables & Forms

List

Table properties

Table example:

<h1>First Edition Auctions</h1>
<table>
<tr>
   <th>Author</th>
   <th>Title</th>
   <th class="money">Reserve Price</th>
   <th class="money">Current Bid</th>
</tr>
<tr>
   <td>E.E. Cummings</td>
   <td>Tulips & Chimneys</td>
   <td class="money">$2,000.00</td>
   <td class="money">$2,642.50</td>
</tr>
<tr class="even">
   <td>Charles d'Orleans</td>
   <td>Poemes</td>
   <td class="money"></td>
   <td class="money">$5,866.00</td>
</tr>
<tr>
   <td>T.S. Eliot</td>
   <td>Poems 1909 - 1925</td>
   <td class="money">$1,250.00</td>
   <td class="money">$8,499.35</td>
</tr>
<tr class="even">
   <td>Sylvia Plath</td>
   <td>The Colossus</td>
   <td class="money"></td>
   <td class="money">$1031.72</td>
</tr>
</table>

Styling forms

Summary

In addition to the CSS properties covered in other chapters which work with the contents of all elements, there are several others that are specifically used to control the appearance of lists, tables, and forms.

List markers can be given different appearances using the list-style-type and list-style image properties.

Table cells can have different borders and spacing in different browsers, but there are properties you can use to control them and make them more consistent.

Forms are easier to use if the form controls are vertically aligned using CSS.

Forms benefit from styles that make them feel more interactive.

Event

“When you browse the web, your browser registers different types of events. It’s the browser’s way of saying, “Hey, this just happened .” Your script can then respond to these events.”

Select the element node(s) you want the script to respond to.

Indicate which event on the selected nodes will trigger the response.

State the code you want to run when the event occurs.

image

Summary