JavaScript JavaScript and the DOM Getting a Handle on the DOM Select All Elements of a Particular Type

brendon hanson
brendon hanson
6,137 Points

I don't quite understand the (.style.color) where do you get these words?

Is there a site that shows all the words you can use? Could you give me any detail on why you say style.color please?

2 Answers

Steven Parker
Steven Parker
130,935 Points

MDN is an excellent reference for this kind of information. The "style" keyword is one of the properties of an HTMLelement, and "color" is one of the vast collection of CSS properties that can be set.

In this case, ".style.color" is the specific property that controls what foreground (such as for text) color will be used for displaying that specific element on the screen.

Christian Higgins
Christian Higgins
12,421 Points

Brendon, have you watch the prerequisite CSS courses, such as CSS Basics?

brendon hanson
brendon hanson
6,137 Points

No, but I am going to go through that course and the html course very soon! I should've done that to begin with but oh well