Higher – DIV CSS recap lesson

Using the supplied flag sheet create a HTML document to display each flag. Flags should be created using <DIV>, use CSS to style, you can choose to use inline, internal, or external CSS.

Make use of float, background-color, borders, etc. as you see fit. I would say each flag should be about 300px long and 150px high.

Code for an example French flag shown after the break.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<head>
<title>French Flag</title>
</head>
<body>
 
<div style="border-width:2px;width:300px;border-style:solid;">
 
  <div style="background-color:red;height:50px"></div>
   
  <div style="background-color:white;height:50px"></div>
   
  <div style="background-color:blue;height:50px"></div>
 
</div>
 
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *