Javascript DOM Element Style Set
<!DOCTYPE html> <html lang="en"> <style> #divAdvert {// ww w.j a v a2 s. c om font: 12pt arial; } </style> </head> <body> <div id="divAdvert">Here is an advertisement.</div> <script> let divAdvert = document.getElementById("divAdvert"); divAdvert.style.fontStyle = "italic"; divAdvert.style.textDecoration = "underline"; </script> </body> </html>