0

How to style in js

I want to style in js but I am not able to do it is showing some error or is not working properlyhttps://code.sololearn.com/WIWU52Z0G51n/?ref=app show me another method to style

18th Jun 2020, 12:19 PM
Tushar Nagar
Tushar Nagar - avatar
3 Antworten
+ 3
function start(){ document.write("<div style='color:blue;font-size:30px;font-weight:bolder ;align-text:center;border-style:solid ;border-color:yellow;border-width:25px;border-radius:25px; height:90px;width:100px;padding:10px;background-color:green;'>LEARN HTML</div>") } You forgot to add single quotes to style like style=' '
18th Jun 2020, 12:51 PM
Abhay
Abhay - avatar
+ 3
Then share the link of your code please using "+" sign so we can see what is wrong
18th Jun 2020, 12:29 PM
Abhay
Abhay - avatar
+ 1
You shouldn't do it in this way. Do it in this way instead https://code.sololearn.com/WXMJn4FcaLXN/?ref=app
18th Jun 2020, 3:44 PM
Gordon
Gordon - avatar