Page 116 - CodePilot V5.0 C7
P. 116
DESCRIPTION LISTS
A description list is a list of terms, with a description of each term. The description or definition list is
defined using the <DL> tag. This is a container tag which needs to be closed with </DL>. In between,
you have to include one or more pairs of <DT> (defines terms/names) and <DD> (describes each
term/name) tags.
Code Write the HTML code to present the given web page using the <DL> tag to create a
5 description list.
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> Using Definition List</TITLE>
</HEAD>
<BODY
STYLE="BACKGROUND-COLOR: #F1F8E9;
COLOR: #333333;">
<H1>
Science Terms and their Definitions
</H1>
<DL>
<DT>Gravity</DT>
<DD>The force that pulls objects towards the Earth's centre or any mass.
</DD>
<DT>Energy</DT>
<DD>The ability to do work. It exists in forms like kinetic, potential,
and thermal energy. </DD>
</DL>
</BODY>
</HTML>
USING CSS WITH LISTS
You can customise list markers, use images as markers or change list indentation with CSS
properties such as list-style-type, list-style-image, list-style-position and list-style. The table
below summarises them.
114
CodePilot (V5.0)-VII

