Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Getting Specific Element Properties

Name 	Description
tagName 	    A string representing the tag name of the element, such as P, DIV or H1
id 	            The value of the id attribute on the element, as a string
className 	    The value of the class attribute on the element, as a string
classList 	    The list of classes in the class attribute as an array-like structure which can be iterated
attributes 	    A NamedNodeMap of all the element's attributes and their values. It can be iterated
clientHeight 	A Number representing the inner height of the element
clientWidth 	A Number representing the inner width of the element
innerHTML 	    The content inside the element including HTML markup
outerHTML 	    Same as innerHTML, except it includes the element itself as well
 
PREVIOUS NEXT
Tagged: #Getting #Specific #Element #Properties
ADD COMMENT
Topic
Name
8+8 =