> For the complete documentation index, see [llms.txt](https://9silvery2.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://9silvery2.gitbook.io/javascript/jquery/undefined-1/undefined-6.md).

# 자식 요소 선택자

## 1. 자식 요소 선택자&#x20;

| 종류                        | 설명                                 |
| ------------------------- | ---------------------------------- |
| :first-child              | 첫 번째 자식 요소를 선택합니다.                 |
| :first-of-type            | 첫 번째 자식 요소와 일치하는 유형을 선택합니다.        |
| :last-child               | 마지막 번째 자식 요소를 선택합니다.               |
| :last-of-type             | 마지막 번째 자식 요소와 일치하는 유형을 선택합니다.      |
| :nth-child(index)         | index 번째에 있는 자식 요소를 선택합니다.         |
| :nth-last-child(index)    | index 번째에 있는 마지막 자식 요소를 선택합니다.     |
| :nth-of-type(index)       | index 번째에 있는 유형의 자식 요소를 선택합니다.     |
| :nth-last-of-child(index) | index 번째에 있는 마지막 유형의 자식 요소를 선택합니다. |
| :only-child               | 자식 요소가 오직 하나인 요소를 선택합니다.           |
| :only-of-type()           | 자식 요소 중 오직 하나 유형인 요소를 선택합니다.       |
