--- title:
HTML <ul> 요소는 정렬되지 않은 목록을 나타냅니다. 보통 불릿으로 표현합니다.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
| 콘텐츠 카테고리 | 플로우 콘텐츠. 또한, 최소 하나의 {{htmlelement("li")}} 요소를 자식으로 둔다면 뚜렷한 콘텐츠. |
|---|---|
| 가능한 콘텐츠 | 0개 이상의 {{htmlelement("li")}}, {{htmlelement("script")}}, {{htmlelement("template")}} 요소. |
| 태그 생략 | {{no_tag_omission}} |
| 가능한 부모 요소 | 플로우 콘텐츠를 허용하는 모든 요소. |
| 가능한 ARIA 역할 | {{ARIARole("directory")}}, {{ARIARole("group")}}, {{ARIARole("listbox")}}, {{ARIARole("menu")}}, {{ARIARole("menubar")}}, {{ARIARole("radiogroup")}}, {{ARIARole("tablist")}}, {{ARIARole("toolbar")}}, {{ARIARole("tree")}}, {{ARIARole("presentation")}} |
| DOM 인터페이스 | {{domxref("HTMLUListElement")}} |
이 요소는 전역 특성만 포함합니다.
compact attribute, the CSS property {{cssxref("line-height")}} can be used with a value of 80%.circlediscsquareA fourth bullet type has been defined in the WebTV interface, but not all browsers support it: triangle.
If not present and if no CSS {{ cssxref("list-style-type") }} property applies to the element, the user agent selects a bullet type depending on the nesting level of the list.
보통 비정렬 목록의 항목은 선행하는 불릿 마커와 함께 표시합니다.
<ul>과 {{htmlelement("ol")}}은 필요한 만큼 중첩할 수 있고, 서로 교차할 수도 있습니다.
<ul>과 {{htmlelement("ol")}}은 모두 목록을 나타냅니다. 차이가 있다면 <ul>에서는 순서가 중요하지 않다는 점입니다. 항목의 순서를 바꿨을 때 의미도 바뀐다면 {{htmlelement("ol")}}을 사용하세요. 그렇지 않으면 <ul>을 사용할 수 있습니다.
<ul> <li>first item</li> <li>second item</li> <li>third item</li> </ul>
{{EmbedLiveSample("간단한_예제", 400, 100)}}
<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>
{{EmbedLiveSample("중첩_목록", 400, 220)}}
<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>
{{EmbedLiveSample("비정렬_목록_안의_정렬_목록", 400, 150)}}
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('HTML WHATWG', 'semantics.html#the-ul-element', '<ul>')}} | {{Spec2('HTML WHATWG')}} | |
| {{SpecName('HTML5 W3C', 'grouping-content.html#the-ul-element', '<ul>')}} | {{Spec2('HTML5 W3C')}} |
{{Compat("html.elements.ul")}}
<ol> 요소와 유용하게 사용할 수 있는 CSS 속성
compact 특성을 대체할 수 있는 {{cssxref("line-height")}}