<!DOCTYPE html> <p>Click the button to add a red background color to all elements with class="city".</p> <button onclick="w3.addStyle('.city','background-color','red')">Add Style</button> <div id="London" class="city"> <div id="Paris" class="city"> <div id="Tokyo" class="city"> </body> |
Click the button to add a red background color to all elements with class="city". LondonLondon is the capital city of England. ParisParis is the capital of France. TokyoTokyo is the capital of Japan. |