기록

HTML - Elements 정리

안녕하세요 청이 입니다.

이번에 코드 작업을 하면서 HTML Tag 에 적용할수 있는 다양한 값들이 있다는걸 알게 되어 목록으로 정리 합니다.

Property / Method Description 설명
accessKey Sets or returns the accesskey attribute of an element 엘리먼트의 accesskey 속성을 설정하거나 반환합니다.
addEventListener() Attaches an event handler to an element 엘리먼트에 이벤트 핸들러를 추가합니다.
appendChild() Adds (appends) a new child node to an element 엘리먼트에 새로운 자식 노드를 추가(append)합니다.
attributes Returns a https://www.w3schools.com/jsref/dom_obj_attributes.asp of an element's attributes 엘리먼트의 속성(attribute) 목록을 반환합니다.
blur() Removes focus from an element 엘리먼트로부터 포커스(focus)를 제거합니다.
childElementCount Returns an elements's number of child elements 엘리먼트의 자식 엘리먼트(child element) 개수를 반환합니다.
childNodes Returns a https://www.w3schools.com/jsref/dom_obj_html_nodelist.asp of an element's child nodes 엘리먼트의 자식 노드(child node) 목록을 반환합니다.
children Returns an https://www.w3schools.com/jsref/dom_obj_htmlcollection.asp of an element's child elements 엘리먼트의 자식 엘리먼트(child element) 목록을 반환합니다.
classList Returns the class name(s) of an element 엘리먼트의 클래스 이름(class name)을 반환합니다.
className Sets or returns the value of the class attribute of an element 엘리먼트의 class 속성 값을 설정하거나 반환합니다.
click() Simulates a mouse-click on an element 엘리먼트에 마우스 클릭 이벤트를 발생시킵니다.
clientHeight Returns the height of an element, including padding 엘리먼트의 높이(height)를 반환합니다. 여기서는 padding 값을 포함합니다.
clientLeft Returns the width of the left border of an element 엘리먼트의 왼쪽(border left) 픽셀 값을 반환합니다.
clientTop Returns the width of the top border of an element 엘리먼트의 위쪽(border top) 픽셀 값을 반환합니다.
clientWidth Returns the width of an element, including padding 엘리먼트의 너비(width)를 반환합니다. 여기서는 padding 값을 포함합니다.
cloneNode() Clones an element 엘리먼트를 복제합니다.
closest() Searches the DOM tree for the closest element that matches a CSS selector CSS 선택자(selector)와 일치하는 가장 가까운 엘리먼트를 검색합니다.
compareDocumentPosition() Compares the document position of two elements 두 엘리먼트의 상대적인 위치를 비교합니다.
contains() Returns true if a node is a descendant of a node 노드(node)가 다른 노드의 하위 노드(descendant)인지 여부를 반환합니다.
contentEditable Sets or returns whether the content of an element is editable or not 엘리먼트의 내용이 편집 가능한지 여부를 설정하거나 반환합니다.
dir Sets or returns the value of the dir attribute of an element 엘리먼트의 dir 속성 값을 설정하거나 반환합니다.
firstChild Returns the first child node of an element 엘리먼트의 첫 번째 자식 노드(first child node)를 반환합니다.
firstElementChild Returns the first child element of an element 엘리먼트의 첫 번째 자식 엘리먼트(first child element)를 반환합니다.
focus() Gives focus to an element 엘리먼트에 포커스(focus)를 부여합니다.
getAttribute() Returns the value of an element's attribute 엘리먼트의 속성(attribute) 값을 반환합니다.
getAttributeNode() Returns an attribute node 속성(attribute) 노드를 반환합니다.
getBoundingClientRect() Returns the size of an element and its position relative to the viewport 엘리먼트의 크기와 뷰포트(viewport) 기준 위치를 반환합니다.
getElementsByClassName() Returns a collection of child elements with a given class name 지정한 클래스 이름(class name)을 가진 자식 엘리먼트(child element) 목록을 반환합니다.
getElementsByTagName() Returns a collection of child elements with a given tag name 지정한 태그 이름(tag name)을 가진 자식 엘리먼트(child element) 목록을 반환합니다.
hasAttribute() Returns true if an element has a given attribute 엘리먼트가 지정한 속성(attribute)을 가지고 있는지 여부를 반환합니다.
hasAttributes() Returns true if an element has any attributes 엘리먼트가 어떤 속성(attribute)을 가지고 있는지 여부를 반환합니다.
hasChildNodes() Returns true if an element has any child nodes 엘리먼트가 어떤 자식 노드(child node)를 가지고 있는지 여부를 반환합니다.
id Sets or returns the value of the id attribute of an element 엘리먼트의 id 속성 값을 설정하거나 반환합니다.
innerHTML Sets or returns the content of an element 엘리먼트의 내용을 설정하거나 반환합니다.
innerText Sets or returns the text content of a node and its descendants 노드(node)와 그 자손(descendants)의 텍스트 내용을 설정하거나 반환합니다.
insertAdjacentElement() Inserts a new HTML element at a position relative to an element 엘리먼트의 상대적인 위치에 새로운 HTML 엘리먼트를 삽입합니다.
insertAdjacentHTML() Inserts an HTML formatted text at a position relative to an element 엘리먼트의 상대적인 위치에 새로운 HTML 형식의 텍스트를 삽입합니다.
insertAdjacentText() Inserts text into a position relative to an element 엘리먼트의 상대적인 위치에 텍스트를 삽입합니다.
insertBefore() Inserts a new child node before an existing child node 기존 자식 노드(child node) 앞에 새로운 자식 노드를 삽입합니다.
isContentEditable Returns true if an element's content is editable 엘리먼트의 내용이 편집 가능한지 여부를 반환합니다.
isDefaultNamespace() Returns true if a given namespaceURI is the default 지정한 namespaceURI가 기본값(default)인 경우 true를 반환합니다.
isEqualNode() Checks if two elements are equal 두 엘리먼트가 같은 엘리먼트인지 여부를 확인합니다.
isSameNode() Checks if two elements are the same node 두 엘리먼트가 같은 노드(node)인지 여부를 확인합니다.
isSupported() https://www.w3schools.com/jsref/met_node_issupported.asp 노드(node)가 DOM에서 지원되는지 여부를 반환합니다.
lang Sets or returns the value of the lang attribute of an element 엘리먼트의 lang 속성 값을 설정하거나 반환합니다.
lastChild Returns the last child node of an element 엘리먼트의 마지막 자식 노드(last child node)를 반환합니다.
lastElementChild Returns the last child element of an element 엘리먼트의 마지막 자식 엘리먼트(last child element)를 반환합니다.
matches() Returns true if an element is matched by a given CSS selector 지정한 CSS 선택자(selector)와 일치하는 경우 true를 반환합니다.
namespaceURI Returns the namespace URI of an element 엘리먼트의 namespace URI를 반환합니다.
nextSibling Returns the next node at the same node tree level 같은 노드 트리 레벨에서 다음 노드(node)를 반환합니다.
nextElementSibling Returns the next element at the same node tree level 같은 노드 트리 레벨에서 다음 엘리먼트를 반환합니다.
nodeName Returns the name of a node 노드(node)의 이름을 반환합니다.
nodeType Returns the node type of a node 노드(node)의 유형(type)을 반환합니다.
nodeValue Sets or returns the value of a node 노드(node)의 값을 설정하거나 반환합니다.
normalize() Joins adjacent text nodes and removes empty text nodes in an element 인접한 텍스트 노드(text node)를 결합하고, 빈 텍스트 노드를 제거합니다.
offsetHeight Returns the height of an element, including padding, border and scrollbar 엘리먼트의 높이(height)
offsetWidth Returns the width of an element, including padding, border and scrollbar 엘리먼트의 너비를 반환합니다. 패딩, 테두리, 스크롤바를 포함합니다.
offsetLeft Returns the horizontal offset position of an element 엘리먼트의 수평 오프셋 위치를 반환합니다.
offsetParent Returns the offset container of an element 엘리먼트의 오프셋 컨테이너를 반환합니다.
offsetTop Returns the vertical offset position of an element 엘리먼트의 수직 오프셋 위치를 반환합니다.
outerHTML Sets or returns the content of an element (including the start tag and the end tag) 엘리먼트의 내용(시작 태그와 끝 태그 포함)을 설정하거나 가져옵니다.
outerText Sets or returns the outer text content of a node and its descendants 노드와 그 하위 요소들의 외부 텍스트 내용을 설정하거나 가져옵니다.
ownerDocument Returns the root element (document object) for an element 엘리먼트에 대한 루트 엘리먼트(문서 개체)를 반환합니다.
parentNode Returns the parent node of an element 엘리먼트의 부모 노드를 반환합니다.
parentElement Returns the parent element node of an element 엘리먼트의 부모 요소 노드를 반환합니다.
previousSibling Returns the previous node at the same node tree level 동일한 노드 트리 레벨에서 이전 노드를 반환합니다.
previousElementSibling Returns the previous element at the same node tree level 동일한 노드 트리 레벨에서 이전 요소를 반환합니다.
querySelector() Returns the first child element that matches a CSS selector(s) CSS 선택기와 일치하는 첫 번째 하위 요소를 반환합니다.
querySelectorAll() Returns all child elements that matches a CSS selector(s) CSS 선택기와 일치하는 모든 하위 요소를 반환합니다.
remove() Removes an element from the DOM DOM에서 엘리먼트를 삭제합니다.
removeAttribute() Removes an attribute from an element 엘리먼트에서 속성을 제거합니다.
removeAttributeNode() Removes an attribute node, and returns the removed node 속성 노드를 삭제하고 삭제된 노드를 반환합니다.
removeChild() Removes a child node from an element 엘리먼트에서 하위 노드를 삭제합니다.
removeEventListener() Removes an event handler that has been attached with the addEventListener() method addEventListener() 메소드로 추가된 이벤트 핸들러를 제거합니다.
replaceChild() Replaces a child node in an element 엘리먼트의 하위 노드를 교체합니다.
scrollHeight Returns the entire height of an element, including padding 엘리먼트의 전체 높이를 반환합니다(padding 포함)
scrollIntoView() Scrolls the an element into the visible area of the browser window 엘리먼트를 브라우저 창의 보이는 영역으로 스크롤합니다.
scrollLeft Sets or returns the number of pixels an element's content is scrolled horizontally 엘리먼트의 콘텐츠가 수평으로 스크롤된 픽셀 수를 설정하거나 반환합니다.
scrollTop Sets or returns the number of pixels an element's content is scrolled vertically 엘리먼트의 콘텐츠가 수직으로 스크롤된 픽셀 수를 설정하거나 반환합니다.
scrollWidth Returns the entire width of an element, including padding 엘리먼트의 전체 너비를 반환합니다(padding 포함)
setAttribute() Sets or changes an attribute's value 속성의 값을 설정하거나 변경합니다.
setAttributeNode() Sets or changes an attribute node 속성 노드를 설정하거나 변경합니다.
style Sets or returns the value of the style attribute of an element 엘리먼트의 스타일 속성 값을 설정하거나 반환합니다.
tabIndex Sets or returns the value of the tabindex attribute of an element 엘리먼트의 tabindex 속성 값을 설정하거나 반환합니다.
tagName Returns the tag name of an element 엘리먼트의 태그 이름을 반환합니다.
textContent Sets or returns the textual content of a node and its descendants 노드와 해당 자식 노드의 텍스트 콘텐츠를 설정하거나 반환합니다.
title Sets or returns the value of the title attribute of an element 엘리먼트의 title 속성 값을 설정하거나 반환합니다.
toString() Converts an element to a string 엘리먼트를 문자열로 변환합니다.
getNamedItem() Returns an attribute node (by name) from a NamedNodeMap NamedNodeMap에서 이름으로 속성 노드를 반환합니다.
item() Returns an attribute node (by index) from a NamedNodeMap NamedNodeMap에서 인덱스로 속성 노드를 반환합니다.
length Returns the number of attributes in a NamedNodeMap NamedNodeMap의 속성 수를 반환합니다.
removeNamedItem() Removes an attribute (node) 속성(node)을 제거합니다.
setNamedItem() Sets an attribute (node) by name 이름으로 속성(node)을 설정합니다.

댓글

이름만 적고 남길 수 있어요