Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <p id="demo">This is a paragraph.</p> <select onchange="myFunction(this);" size="13"> <option>normal</option> <option>bold</option> <option>bolder</option> <option>lighter</option> <option>100</option> <option>200</option> <option>300</option> <option>400</option> <option>500</option> <option>600</option> <option>700</option> <option>800</option> <option>900</option> </select> <script> function myFunction(selectTag) { var listValue = selectTag.options[selectTag.selectedIndex].text; document.getElementById("demo").style.fontWeight = listValue; } </script> </body> </html>