Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 56 - 2609_Logiccode
P. 56

    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 5.  Write  the  HTML  code  to  present  the  given web page  using  the  <DL>  tag  to  create  a
                               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.

                       54   Premium Edition-VII

| 51 52 53 54 55 56 57 58 59 60 61 |