Changing two attribute values using js

Please, is there any help, I am trying to change tvo values using only one button, here is the code;

<!DOCTYPE html>

<h2>What Can JavaScript Do?</h2>


<li id="demo">Java</li>
<li id="lala">PHP</li>
<li id="lili">C sharp </li>

<button type="button" onclick="document.getElementById('lala').style.fontWeight = 'bold'">Bold</button>

<button type="button" onclick="document.getElementById('lala').style.color = 'red'">Red</button>

<button type="button" onclick="document.getElementById('lili').style.color = 'red'">Red</button>


Many thanks!

What do you mean by changing two values?

Which two values? You have three buttons, which one button?

I want to use just one button to get one item bot bold AND red. Is that possible?


Remove your two other li elements. Leave the one you want to modify.
Remove all other buttons except the one you want to modify as well.

Target your li element with the correct id. After you execute one operation, chain another operation right after it whether it’s changing color or changing fontweight.

Many thanks SOLVED!!!