Friday, 8 April 2016

Description, Nested List in HTML

<dl> tag defines  a description<dt> tag defines the names and <dd> tag defines each term
Definition List in HTML
<html>
<body>
<p>A Definition List:</p>
<dl>
  <dt>Coffee</dt>
  <dd>- black hot drink</dd>
  <dt>Milk</dt>
  <dd>- white cold drink</dd>
</dl>
</body>
</html>
OUTPUT 
A Definition List:
Coffee
- black hot drink
Milk
- white cold drink

 Nested list in HTML
<html>
<body>


<h1>A Nested List</h1>
<ul>
  <li>Milk</li>
  <li>Tea
    <ul>
    <li>Hot tea</li>
    <li>Cold drink</li>
    </ul>
  </li>
  <li>Milk</li>
<li> Coffee</li>
</ul>
</body>
</html>

A Nested List

  • Milk
  • Tea
    • Hot tea
    • Cold drink
  • Milk
  • Coffee




No comments:

Post a Comment