Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lists | Working with Semantic Elements, Multimedia Elements and Graphics
HTML for Beginners
course content

Contenido del Curso

HTML for Beginners

HTML for Beginners

1. Understanding Basic Elements
2. Working with Semantic Elements, Multimedia Elements and Graphics
3. Working with Advanced Elements

Lists

There are three types of lists in HTML:

  • Unordered lists;
  • Ordered lists;
  • Descriptive lists.

Ordered list

Ordered lists are created with the <ol> tags. You use <li> tags to add items to an ordered list. These <li> tags should come between the opening <ol> tag and the closing <ol> tag.

html

index

css

index

js

index

copy

As you can see browser will render the output with numbers before listing items. However, if you want to use letters instead of numbers, you can use the type attribute of the <ol> tag.

html

index

css

index

js

index

copy

Similarly, you can assign "a" and "i" to type attributes to get small letters or roman numbers before the list items.

Unordered list

Unordered lists are created the same way ordered lists are created. However, instead of <ol> tags, you use <ul> tags.

html

index

css

index

js

index

copy

A mix of Ordered Lists and Unordered lists

You can mix ordered lists and unordered lists.

html

index

css

index

js

index

copy

So as you can see, we can use ordered lists under unordered lists.

Descriptive lists

Sometimes we want to create a list of items with descriptions for each item. We use the <dl> tag along with <dt> and <dd> tags to create a list.

html

index

css

index

js

index

copy

Here <dl> tag initiates a descriptive list. Then <dt> tag defines the term of the list item. Finally, the <dd> tag describes the term.

1. Which of the following tag is used to create an unordered list?
2. Which of the following attributes can be used with <ol> tags?

Which of the following tag is used to create an unordered list?

Selecciona la respuesta correcta

Which of the following attributes can be used with

    tags?

Selecciona unas respuestas correctas

¿Todo estuvo claro?

Sección 2. Capítulo 1
We're sorry to hear that something went wrong. What happened?
some-alt