4 HTML
4 HTML
Language (HTML)
HTML Lists
- HTML lists allow web developers to group a set
of related items in lists.
<h2>An Unordered HTML
List</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li> By: Engr. Richard P. Cabales
HTML Description Lists
- A description list is a list of terms, with a
description of each term.
- The <dl> tag defines the description list, the
<dt> tag defines the term (name), and the <dd>
tag describes each term:
<h2>A Description List</h2>
<dl>
<dt>Coffee</dt>
<dd>- black hot
drink</dd>
<dt>Milk</dt>
<dd>- white cold
drink</dd>
</dl>
<ul style="list-style-type:none;">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
<ol type="A">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol>
<li>Coffee</li>
<li>Tea
<ol>
<li>Black tea</li>
<li>Green tea</li>
</ol>
</li>
<li>Milk</li>
</ol>
<script>
function displayResult() {
document.getElementById("myHeader").innerHTML = "Have a nice
day!";
}
</script>