HTML and CSS Reference
In-Depth Information
<
div class
=
”girls”
>
<
h2
>&
nbsp
;
Girls
</
h2
>
<
ul
>
<
li
>
Olivia
</
li
>
<
li
>
Tess
</
li
>
<
li
>
Emily
</
li
>
</
ul
>
</
div
>
</
section
>
<
section
>
<
div class
=
”boys”
>
<
h2
>&
nbsp
;
Boys
</
h2
>
<
ul
>
<
li
>
Jacob
</
li
>
<
li
>
Ricky
</
li
>
<
li
>
John
</
li
>
</
ul
>
</
div
>
</
section
>
</
body
>
</
html
>
Figure 5-6 shows the output, but the important point is that the
<div>
tag was employed
only to provide the background colors for two dif erent
<section>
elements.
96
Figure 5-6: Using the
<div>
tag for styling.