#va{
color:yellow;
}
#v{
color:pink;
}
<div id = "va">
<div id ="v">my name is </div>
<div>khan</div>
</div>
After trying to use document.getelementbyid("va").style.color="yellow";, I found that the color of element v is not changing. I am looking to change its color by the id of the parent element using JavaScript. This is a simple example of the situation I am facing, and I need help resolving it. Please assist.