LISTS

Lists are used to put lists which can be to-do, or any kind of list.To make a list we use <ol> or <ul>.

If we want an ordered list for example-

1     a     A     I

2     b    B     II

3     c     C     III

We use <ol> tag the default one is 1 2 3, but if we want to change it we use <ol type=1>which specifies that we want to use the method of 1 2 3, we can also specify that from where do we have to start, for example.

<ol type=a start=4>

This will print the item, starting from d and so on. We have to use <li> tag, which means list item. So for ordered lists we use the code as.

<!doctype html>

<html>

<head><title>HTML_schooling</title></head>

<body bgcolor=yellow>

<ol type=1 start=2>

<li>toffee

<li>chocolate

<li>pizza

</ol>

</body>

</html>

Now, we start unordered list, in an ordered list we have circles, squares and discs (default). In this list we do not have start attribute.

  • circle
  • disc
  • square

The code for the following would be:-

<!doctype html>

<html>

<head><title>HTML_schooling</title></head>

<body>

<ul type=circle>

<li>circle

</ul>

<ul type=disc>

<li>disc

</ul>

<ul type=square>

<li>square

</ul>

</body>

</html>

Now, the list is completed

Advertisements