Element indicates the html elements which consists of html tags and content present inside it.
Some important selectors are explained below,
We can select the html element by id value using getElementById method.
In the above example, we are finding the element which has value as testid and its storing elem variable.
Next by using style property of the elem variable we are change the background color of the specified element.
elem.style - using this we can change all the css properties, in this example set the background css property as red value.
In a html document, various html elements may contain same class value, so this must be returned in an array.