JavaScript Element Properties
You are Here:
JavaScript Element Properties
The following are the list of Element properties available in JavaScript programming.
Functions | Explanation |
---|---|
accessKey | Gets or sets the accesskey attribute of an element. |
accessKeyLabel | Returns a String that represents the element's assigned access key (if any). |
attributes | Gets a collection of all attribute nodes registered to the specified node. |
classList | Returns a live DOMTokenList collection of the class attributes of the element. |
className | Gets and sets the value of the class attribute of the specified element. |
clientHeight | Returns the inner height of an element, in pixels. |
clientLeft | Returns the width of the left border of an element, in pixels. |
clientTop | Returns the width of the top border of an element, in pixels. |
clientWidth | Returns the inner width of an element, in pixels. |
contentEditable | Gets or sets whether the content of an element is editable or not. |
dataset | Gets or sets all the custom data attributes (data-*) set on the element. |
dir | Gets or sets the text writing directionality of the content of the current element. |
hidden | Gets or sets the hidden status of the specified element. |
isContentEditable | Returns a Boolean value indicates whether the contents of the element are editable or not. |
innerHTML | Gets or sets the HTML or XML markup contained within the element. |
innerText | Gets or sets the text content of the specified node, and all its descendants. |
lang | Gets or sets the base language of an element's attributes, text, and content. |
localName | Returns a DOMString representing the local part of the element's qualified name. |
nextElementSibling | Returns the element immediately following the specified element. |
outerHTML | Gets the outer HTML (including the opening and closing tags) of an element. |
outerText | As a setter, it removes the current node and replaces it with the given text. As a getter, it it returns the same value as element.innerText. |
offsetHeight | Returns the height of an element, including vertical padding and borders, as an integer. |
offsetLeft | Returns the margin-left of an element with respect to it parent element. |
offsetParent | Returns a reference to the object which is the closest positioned containing element. |
offsetTop | Returns the margin-top of an element with respect to it parent element. |
offsetWidth | Returns the width of an element, including horizontal padding and borders, as an integer. |
previousElementSibling | Returns the element immediately preceding the specified element. |
scrollHeight | Returns the total height of an element, in pixels. |
scrollLeft | Gets or sets the number of pixels an element's content is scrolled horizontally. |
scrollTop | Gets or sets the number of pixels that an element's content is scrolled vertically. |
scrollWidth | Returns the total width of an element, in pixels. |
shadowRoot | Returns the open shadow root that is hosted by the element, null if no open shadow root is present. |
style | Gets or sets the inline style of an element. |
tabIndex | Gets or sets the value of the tabindex attribute of an element. |
tagName | Returns the name of the tag for the given element. |
title | Gets or sets the value of the title attribute of an element. |
Reminder
Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in JavaScript.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.