Sunday 27 March 2016

Create an HTML page with 3 type (ordered, unordered and definition) list element tags?

Code: 


<!DOCTYPE html>
<html>
<head>
    <title>Types of list</title>
</head>
<body>
<center><h1>Types of lists</h1></center>
<h2>Ordered list</h2>
<ol>
    <li>Football</li>
    <li>Cricket</li>
    <li>Hockey</li>
</ol>
<h2>Unordered list</h2>
<ul>
    <li>Football</li>
    <li>Cricket</li>
    <li>Hockey</li>
</ul>
<h2>Definition list</h2>
<dl>
    <dt>Leo Messi</dt><dd>-Football player</dd>
    <dt>M.S Dhoni</dt><dd>-Cricket player</dd>
    <dt>Sardar Singh</dt><dd>-Hockey player</dd>
</dl>
</body>
</html>


Output:


No comments:

Post a Comment