Thanks to visit codestin.com
Credit goes to developer.mozilla.org

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

요소

요소(element)는 웹 페이지를 구성합니다. XMLHTML에서, 요소는 데이터 항목, 텍스트 한 묶음, 이미지를 담을 수 있고, 아무것도 담지 않을 수도 있습니다. 일반적인 요소는 여는 태그와 몇 가지 특성, 내부의 텍스트 콘텐츠, 닫는 태그로 구성됩니다.

Example: in <p class="nice">Hello world!</p>, '<p class="nice">' is an opening tag, 'class="nice"' is an attribute and its value, 'Hello world!' is enclosed text content, and '</p>' is a closing tag.

요소와 태그같지 않습니다. 태그는 소스 코드에서 요소의 시작과 끝을 표시하고, 요소는 브라우저가 페이지를 표시할 때 사용하는 문서 모델인 DOM의 일부입니다.

같이 보기