The following properties, and methods can be used on all HTML elements.
Note: All elements can also use the properties/methods of the Node object and the Element object.
| Property | Description | W3C |
|---|---|---|
| accessKey | Sets or returns an accesskey for an element | Yes |
| className | Sets or returns the class attribute of an element | Yes |
| clientHeight | Returns the viewable height of the content on a page (not including borders, margins, or scrollbars) | No |
| clientWidth | Returns the viewable width of the content on a page (not including borders, margins, or scrollbars) | No |
| dir | Sets or returns the text direction of an element | Yes |
| id | Sets or returns the id of an element | Yes |
| innerHTML | Sets or returns the HTML contents (+text) of an element | Yes |
| lang | Sets or returns the language code for an element | Yes |
| offsetHeight | Returns the height of an element, including borders and padding if any, but not margins | No |
| offsetLeft | Returns the horizontal offset position of the current element relative to its offset container | No |
| offsetParent | Returns the offset container of an element | No |
| offsetTop | Returns the vertical offset position of the current element relative to its offset container | No |
| offsetWidth | Returns the width of an element, including borders and padding if any, but not margins | No |
| scrollHeight | Returns the entire height of an element (including areas hidden with scrollbars) | No |
| scrollLeft | Returns the distance between the actual left edge of an element and its left edge currently in view | No |
| scrollTop | Returns the distance between the actual top edge of an element and its top edge currently in view | No |
| scrollWidth | Returns the entire width of an element (including areas hidden with scrollbars) | No |
| style | Sets or returns the style attribute of an element | Yes |
| tabIndex | Sets or returns the tab order of an element | Yes |
| title | Sets or returns the title attribute of an element | Yes |
| Method | Description | W3C |
|---|---|---|
| toString() | Converts an element to a string | Yes |
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.