ComputersProgramming

How to make a list in the list. HTML-manual for beginners

Pages of websites consist of many elements - tables, pictures, links, media files, lists. One of the most sought after items is just the list. With its help, you can organize information, submit it in a more concise and understandable form, to facilitate the perception. That's why you should know how to make a list in HTML and what kinds of lists there are. And also learn how to set the necessary parameters.

Types of lists

First, let's outline the main types of lists with which we can work. This is an ordered, unordered and drop-down list.

The first allows you to number the contents with numbers and letters. The second is a normal enumeration of those or other items, the third one allows you to select from the entire list the desired element.

Almost each of them can contain a list in the list. HTML allows you to easily create complex lists of information in a very short time.

First of all, decide which of the lists you need, and then proceed to create it. Below we will look at all three types of lists and find out exactly how to create them and what parameters they have.

Ordered list

Let's start with the most used and distributed list - orderly. In this case, the enumeration of certain information goes in a certain order, and each of the elements is numbered. For example, a class list:

  1. Ivanov.
  2. Petrov.
  3. Sidorov, and so on.

This list is specified using the

    and paired tags. It starts with the opening tag
      , and ends with a tag. Each new element of the list begins with the pair
    1. tag and ends with a closing .

      Now you know how to make an HTML list. As you can see, for this it is enough to remember only two tags.

      A bit about the parameters of the

        - type tag and Start.

        The first one specifies the type of numbering - alphabetic or numeric. It can take such parameters: A, a, I, i, 1.

        The first two values are numbered in Latin letters - uppercase and lowercase, the second two - large and small Roman numerals, the latter value is used if you want the list to be numbered with Arabic numerals.

        It should be noted that in the default lists, the numbering is always specified using Arabic numerals.

        The second parameter - start - specifies the number from which the numbering of the list begins.

        Let's say a couple of words and the parameters of the

      1. tag. He also has two. The first value parameter can change the numbering order. And it will be changed until the moment when this parameter is not registered again (or to the end of the entire list).

        The second parameter - type - will help to change the type of numbering for this item. Quite often there is a variant of a complex list. For example, take an approximate plan of writing :

        1. Introduction.
        2. Main part.
          A) the opinions of others;
          C) my opinion;
          C) Evidence.
        3. Conclusions.

        It's quite easy to create such a list in the HTML list. It is enough to write one main list, and then create the second sub-item in the right place using a different numbering. Here is an example code based on our list:

          1. .
          2. 1. Introduction .
          3. 2. The main part .
          4. opinions of others .
          5. My opinion .
          6. evidence .
          7. .
          8. 3. Conclusions .
          9. .

        Unordered list

        The second kind of list is unordered. It does not matter in which order the elements go. It can be a list of anything - purchases, guests, books, etc.

        This list is specified using the

          and paired tag. In this case, each new element begins with the same paired tag
        • .

          It has only one parameter - type, which sets the type of the marker. The marker can be a circle - painted or not, as well as a painted square. So, an empty circle has the value disc, the shaded circle. The square is specified using square.

          There is also the possibility to create a list in the HTML list. For this, as in the first case, you will have to create two lists, one of which is the main list, the second one is nested.

          Drop-down list

          And the last type of lists is a dropdown. Basically, it is used with scripts and serves to allow the user to send this or that information to the owners of the site or a certain program.

          Examples can be lists from which you should choose the country of residence, the place of study or work, the date of birth, the evaluation of an article, etc. At the same time, you select the item you need in the list before sending the information.

          In passing, we mention the tags that help create a drop-down list. HTML does not have the full functionality to create list data. Note that when working with this type of list, you need to know not only the basics of page layout, but also have an idea about CSS styles and java-scripts.

          The list itself is specified using the