3. Lists #
Created Wednesday 17 June 2020
3 types of lists #
ul
- Unordered-listsol
- Ordered-lists, default is numberdl
- definition lists
About lists #
- Elements inside
ul
,ol
are specified using<li></li>
tag, whereli
stands for list item. - Elements inside dl are specified using
dt
(definition title) anddd
(definition description) items. - Lists can be nested
Examples #
<ul>
<li></li>
<!-- We can input any thing inside a list item -->
</ul>
<ol type="a">
<!-- type = i | I | a | A, default is 1 -->
<li>Optimus</li>
<li>Bumblebee</li>
<!-- lists can be embedded -->
</ol>
<!-- 3rd kind of lists definition -->
<dl>
<dt> Commutative </dt>
<dd> Order of arguments in operation gives the same output </dd>
<dt> Rational </dt>
<dd> Can be represented as a ratio of whole numbers </dd>
</dl>