brendon hanson6,191 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?
Steven Parker143,271 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.
Kevin Ohlsson4,538 Points
Can someone correct me?
<button id="changerButton">change headline color</button>
const colorChangerButton= document.getElementById("changerButton");
colorChangerButton.style.color = "red"
colorChangerButton is a reference to the button.
Button is an element provided by document
colorChangerButton is a link to the element in HTML file accessed from the JS app
.style is a method of the document object model OR .style is a property of the document
.color is an property of style.
.color holds an attribute, in this case ="red".
an attribute is something we give to something that is not something this thing is "Born with".
A property is not an attribution instead an inherit quality of something.
is this right?