<ul>
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 7ì.
HTML <ul> ììë ì ë ¬ëì§ ìì 목ë¡ì ëíë
ëë¤. ë³´íµ ë¶ë¦¿ì¼ë¡ ííí©ëë¤.
ìëí´ ë³´ê¸°
<ul>
<li>Milk</li>
<li>
Cheese
<ul>
<li>Blue cheese</li>
<li>Feta</li>
</ul>
</li>
</ul>
li {
list-style-type: circle;
}
li li {
list-style-type: square;
}
| ì½í ì¸ ì¹´í ê³ ë¦¬ |
íë¡ì° ì½í
ì¸ . ëí, ìµì íëì <li> ìì를 ììì¼ë¡ ëë¤ë©´
ëë ·í ì½í
ì¸ .
|
|---|---|
| ê°ë¥í ì½í ì¸ |
0ê° ì´ìì <li>,
<script>, <template>
ìì.
|
| íê·¸ ìëµ | ë¶ê°ë¥, ììê³¼ ëì í그를 ì¶ê°íë ê²ì íìì ëë¤. |
| ê°ë¥í ë¶ëª¨ ìì | íë¡ì° ì½í ì¸ ë¥¼ íì©íë 모ë ìì. |
| ê°ë¥í ARIA ìí |
directory, group,
listbox, menu,
menubar, radiogroup,
tablist, toolbar,
tree, presentation
|
| DOM ì¸í°íì´ì¤ | HTMLUListElement |
í¹ì±
ì´ ììë ì ì í¹ì±ë§ í¬í¨í©ëë¤.
compact-
This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent, and it doesn't work in all browsers.
ê²½ê³ : Do not use this attribute, as it has been deprecated: use CSS instead. To give a similar effect as the
compactattribute, the CSS propertyline-heightcan be used with a value of80%. type-
This attribute sets the bullet style for the list. The values defined under HTML3.2 and the transitional version of HTML 4.0/4.01 are:
circlediscsquareA fourth bullet type has been defined in the WebTV interface, but not all browsers support it:
<code>triangle`.If not present and if no CSS
list-style-typeproperty applies to the element, the user agent selects a bullet type depending on the nesting level of the list.ê²½ê³ : Do not use this attribute, as it has been deprecated; use the CSS
list-style-typeproperty instead.
ì¬ì© ì¼ë
ë³´íµ ë¹ì ë ¬ 목ë¡ì í목ì ì ííë ë¶ë¦¿ ë§ì»¤ì í¨ê» íìí©ëë¤.
<ul>ê³¼ <ol>ì íìí ë§í¼ ì¤ì²©í ì ìê³ , ìë¡ êµì°¨í ìë ììµëë¤.
<ul>ê³¼ <ol>ì 모ë 목ë¡ì ëíë
ëë¤. ì°¨ì´ê° ìë¤ë©´ <ul>ììë ììê° ì¤ìíì§ ìë¤ë ì ì
ëë¤. í목ì ìì를 ë°ê¿¨ì ë ì미ë ë°ëë¤ë©´ <ol>ì ì¬ì©íì¸ì. ê·¸ë ì§ ìì¼ë©´ <ul>ì ì¬ì©í ì ììµëë¤.
ìì
>ê°ë¨í ìì
<ul>
<li>first item</li>
<li>second item</li>
<li>third item</li>
</ul>
ì¤ì²© 목ë¡
<ul>
<li>first item</li>
<li>
second item
<!-- Look, the closing </li> tag is not placed here! -->
<ul>
<li>second item first subitem</li>
<li>
second item second subitem
<!-- Same for the second nested unordered list! -->
<ul>
<li>second item second subitem first sub-subitem</li>
<li>second item second subitem second sub-subitem</li>
<li>second item second subitem third sub-subitem</li>
</ul>
</li>
<!-- Closing </li> tag for the li that
contains the third unordered list -->
<li>second item third subitem</li>
</ul>
<!-- Here is the closing </li> tag -->
</li>
<li>third item</li>
</ul>
ë¹ì ë ¬ ëª©ë¡ ìì ì ë ¬ 목ë¡
<ul>
<li>first item</li>
<li>
second item
<!-- Look, the closing </li> tag is not placed here! -->
<ol>
<li>second item first subitem</li>
<li>second item second subitem</li>
<li>second item third subitem</li>
</ol>
<!-- Here is the closing </li> tag -->
</li>
<li>third item</li>
</ul>
ëª ì¸
| Specification |
|---|
| HTML > # the-ul-element > |
ë¸ë¼ì°ì í¸íì±
ê°ì´ 보기
- 리ì¤í¸ ê´ë ¨ ë¤ë¥¸ ìì:
<ol>,<li>,<menu> <ol>ììì ì ì©íê² ì¬ì©í ì ìë CSS ìì±- ìì를 ííí ë°©ìì ì§ì íë
list-styleìì±. - ë³µì¡í ì¤ì²© 목ë¡ì ì²ë¦¬í기 ìí CSS ì¹´ì´í°
- ë ì´ì ì¬ì©íì§ ìë
compactí¹ì±ì ëì²´í ì ìëline-height - í목ì ë¤ì¬ì°ê¸°ë¥¼ ì¡°ì í기 ìí
marginìì±.
- ìì를 ííí ë°©ìì ì§ì íë