CSS Exercises
CSS Exercises
<td>Fav Movie</td>
</tr>
<tr>
<td>Spiderman</td>
<td>Spider-Man 2 (2004)</td>
</tr>
<tr>
<td>Batman</td>
<td>Batman Returns (1992)</td>
</tr>
<tr>
<td>Transformers</td>
<td>Transformers-3 (2014)</td>
</tr>
</table>
</p>
<p>
Click below to view their pictures
<a href= Spiderman.jpg target=_blank>Spiderman</a>
<a href= Batman.jpg target=_blank>Batman</a>
<a href= Transformers.jpg target=_blank>Transformers</a>
</p>
</body>
</html>
* Give background color for your webpage in hexadecimal (any color).
You are now going to link CSS file to HTML file by using External type.
Now, create a new file in .css format and save it as myherostyles.css.
In your .css file:
1. Make the table properties contains these following:
border-color (pink in hexadecimal value)
border-style (dashed)
border-width (thick)
circle
circle
o
o
square
square
decimal
decimal number
1.
2.
Example
UAE
Egypt
UAE
Egypt
UAE
Egypt
UAE
Egypt
Load Notepad++.
Save this HTML as ChangeTableProperties.html
Write the most basic HTML code
Give a title Change Table Properties
Write the following as comment in your HTML
In this activity I will learn:
A. How to change the width and height of a table
B. How to change the color of a cell
6. In body section, enter the following HTML code
<table height=250 width=300 border=2>
<tr><td bgcolor= width=200>This is Cell 1</td>
<td width=50>This is Cell 2</td>
<td width=50>This is Cell 3</td>
</tr>
<tr><td width=200>This is Cell 4</td>
<td width=50>This is Cell 5</td>
<td width=50>This is Cell 6</td>
</tr>
7. Change the color for Cell 1 to yellow (in hexadecimal value).
8. Change the color for Cell 2 to blue (in hexadecimal value).
9. Change the color for Cell 3 to silver (in hexadecimal value).
10.Change the color for Cell 4 to red (in hexadecimal value).
11.Change the color for Cell 5 to black (in hexadecimal value).
12.Change the color for Cell 6 to orange (in hexadecimal value).
http://www.codecademy.com/en/tracks/htmlcss