CpSc 217 - Structured and Dynamic Web Programmings
Create a new web page
- Via the body tag set the background to a color of your choice
- Use the table wizard to create a table with 2 rows and 2 columns
- Modify the background color of each of the cells to be different from each other and the page background color.
- Place buttons in each cell labelled(1:1, 1:2, 2:1, and 2:2)
Browse the table in both IE and Netscape. Examine the
table and cell borders. What happens if your modify the table
border to be 1? 2?
- Examine the values for cellspacing. Try various values to determine what cellspacing does.
- Examine the values for cellpadding. Try various values to determine what cellpadding does. (Note: I can never remember which is which!)
- Find the appropriate values of border, cell spacing and cellpadding so that the background colors of the buttons are visible and butt up next to each other (no interior cell lines) and no border.
- Check it in both IE and netscape:
Here's what mine looks like:
Now let's add in-line javascript
- When a button is clicked pop-up an alert box with a message
of which button was clicked
- You'll need to refresh your memory about how to
write an event to handle the mouse click
- It should look similar to this if the upper left cell is selected: