Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lists | HTML Fundamentals
course content

Зміст курсу

HTML Essentials

ListsLists

Lists are used to organize and present information in a structured format. There are two main types of lists: unordered lists (<ul>) and ordered lists (<ol>).

Unordered lists (<ul>)

Unordered lists present items in a bulleted format. Each item in the list is defined using the <li> (list item) tag. Unordered lists are typically used when the order of items is not significant.
Example:

html

index.html

css

index.css

js

index.js

In the example above:

The unordered list (<ul>) displays items with bullet points.

Ordered lists (<ol>)

Ordered lists display items in a numbered sequence. Each item in the list is defined using the <li> (list item) tag. Ordered lists are used when the order of items is important and needs to be emphasized.
Example:

html

index.html

css

index.css

js

index.js

In the example above:

The list is ordered (<ol>), displaying items with numbers.

Nested lists

Lists can also be nested within each other to create hierarchical structures. This means that a list item (<li>) within one list (<ul> or <ol>) can itself contain another list. This is useful for organizing complex information into multiple levels of hierarchy.
Example:

html

index.html

css

index.css

js

index.js

In the example above:

  • The second list item ("Main item 2") contains a nested unordered list (<ul>), creating a hierarchical structure;
  • Each nested list (<ul>) is indented to indicate its hierarchical level visually.

Video Tutorial

1. What tag is used to create unordered lists?
2. When would you use an ordered list instead of an unordered list?
3. What tag is missing in the blanks (___)?

What tag is used to create unordered lists?

Виберіть правильну відповідь

When would you use an ordered list instead of an unordered list?

Виберіть правильну відповідь

What tag is missing in the blanks (___)?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 2. Розділ 7
course content

Зміст курсу

HTML Essentials

ListsLists

Lists are used to organize and present information in a structured format. There are two main types of lists: unordered lists (<ul>) and ordered lists (<ol>).

Unordered lists (<ul>)

Unordered lists present items in a bulleted format. Each item in the list is defined using the <li> (list item) tag. Unordered lists are typically used when the order of items is not significant.
Example:

html

index.html

css

index.css

js

index.js

In the example above:

The unordered list (<ul>) displays items with bullet points.

Ordered lists (<ol>)

Ordered lists display items in a numbered sequence. Each item in the list is defined using the <li> (list item) tag. Ordered lists are used when the order of items is important and needs to be emphasized.
Example:

html

index.html

css

index.css

js

index.js

In the example above:

The list is ordered (<ol>), displaying items with numbers.

Nested lists

Lists can also be nested within each other to create hierarchical structures. This means that a list item (<li>) within one list (<ul> or <ol>) can itself contain another list. This is useful for organizing complex information into multiple levels of hierarchy.
Example:

html

index.html

css

index.css

js

index.js

In the example above:

  • The second list item ("Main item 2") contains a nested unordered list (<ul>), creating a hierarchical structure;
  • Each nested list (<ul>) is indented to indicate its hierarchical level visually.

Video Tutorial

1. What tag is used to create unordered lists?
2. When would you use an ordered list instead of an unordered list?
3. What tag is missing in the blanks (___)?

What tag is used to create unordered lists?

Виберіть правильну відповідь

When would you use an ordered list instead of an unordered list?

Виберіть правильну відповідь

What tag is missing in the blanks (___)?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 2. Розділ 7
some-alt