본문으로 건너뛰기

<ul>, <ol>, <li> Tags

<ul>, <ol>, <li> Tags

The <ul>, <ol>, and <li> tags are used to create lists on web pages.


<ul> Tag

<ul> stands for "unordered list", and is used when the order of the items is not important, similar to how you might have a variety of fruits tossed together in a refrigerator.

Unordered List
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Cherry</li>
</ul>

<ol> Tag

<ol> stands for "ordered list", and is used when the order of items is important, like a to-do list that needs to be followed sequentially.

Ordered List
<ol>
<li>Potato Chips</li>
<li>Choco Pie</li>
<li>Jelly</li>
</ol>

<li> Tag

<li> stands for "list item", and is used within <ul> or <ol> to represent individual items in the list.

List Item
<ul>
<li>Pork Cutlet</li>
<li>Kimchi</li>
<li>Rice</li>
</ul>

Follow the parts emphasized with asterisks in the code to try it out.

다음 내용이 궁금하다면?

월 12,500원 PLUS 멤버십 가입 or 강의를 등록해 주세요!