Logotipo horizontal de Diego C Martín colores invertidos, blanco y naranja para findo negro

How to create lists in HTML

Categorías:  Autor: Diego C Martin 
img-2

Lists are very useful in HTML, not only as an organizational element, but also because with a little CSS we can easily create elegant navigation menus with them.

There are two types of lists, ordered or numbered lists and messy lists, in which a bullet appears in front of each item.

Índice de contenidos del artículo

Sorted lists

This HTML element is useful for numbering things.

The following example shows an ordered list with three book names:

<html>
<head>
</head>
<body>
<ol>
<li>SEO curso práctico</li>
<li>Don quijote de La Mancha</li>
<li>La catedral del mar</li>
</ol>
</body>
</html>

The label is ol

Inside, each of the ordered elements are added with the li label, which also has a start and end clause.

The browser takes care of numbering each of the items contained in the list.

To remember the name of these HTML elements:

<ol> de ordened list
<li> de list item

Remember that the elements of the lists are block from the point of view of design and that in addition, inside we can put what we want. Img, tables, etc.

Unordered lists

    An unordered list does not use a number in front of each item, but a small bullet.

    The way to create these types of lists is the same as ordered lists.

    To remember the name of this HTML tag:

    <ul> de unordered list
    

    Here is one of the examples above to which lists have been added at the end:

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Artículos de la misma categoría

    crossmenu
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram