JavaScript – DOM Element clientTop Property
The Element clientTop property returns the width of the element’s top border not including the element’s top padding or top margin.
The Element clientTop property returns the width of the element’s top border not including the element’s top padding or top margin.
The Element clientWidth property returns the viewable width of an element, including padding, but not the border, scrollbar or margin.
The Element cloneNode() method creates a copy of a node (and all its attributes and their values), and returns the clone.
The Element closest() method searches up the DOM tree (the element and then its ancestors) for elements which matches a specified CSS selector.
The Element compareDocumentPosition() method compares two nodes, and returns an integer describing where they are positioned in the document.
The Element contains() method returns “true” if a node is a descendant of a node, and returns “false” if it’s not.
The Element contentEditable property sets or returns if the content of an element is editable.
The Element dir property sets or returns an elements’s dir attribute, which specifies the text-direction.
The Element focus() method gives focus to an element if it can receive focus.
The Element firstChild property returns the first child node of a node.
The Element firstElementChild property returns the first child element of the specified element.
The Element getAttribute() method returns the value of an element’s attribute.
The Element getAttributeNode() method returns an element’s attribute.
The Element getBoundingClientRect() method returns the size of an element, and its position relative to the viewport.
The Element getElementsByClassName() method returns a collection of child elements with a given class name.
The Element getElementsByClassName() method returns a collection of child elements with a given tag name.
The Element hasAttribute() method returns “true” if the attribute exists, and “false” if it does not exist.
The Element hasAttributes() method returns “true” if a node has attributes, and “false” if it does not.
The Element hasChildNodes() method returns “true” if the specified node has any child nodes, and “false” if it does not have any child nodes.
The Element id property sets or returns the value of an element’s id attribute.