Slip 21 - B) Write HTML code which generates the following output and display each element of list in different size, color & font. Use internal CSS to format the list. o Coffee o Tea Black Tea Green Tea 1) Africa 2) China

Solution:

<html>
<head>
<style>
ul.u1 {
background: blue;
padding: 20px;
}
ul.u2 {
background: blue;
list-style-type: square;
}
ol {
background: blue;
}
ul li {
background: lightblue;
margin: 5px;
}
</style>
</head>
<body>
<ul class="u1">
<li>Coffee</li>
<li>Tea</li>
<ul class="u2">
<li>Black Tea</li>
<li> Green Tea</li>
<ol>
<li>Africa</li>
<li>China</li>
</ol>
</ul>
</ul>
</body>
</html>

Post a Comment

0 Comments