Can i change the size of the text in JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
24th Jun 2018, 6:56 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
2 Answers
+ 4
You can with fontsize() method. In your case use it like this: document.write(("the square root of " + x + " is " + number).fontsize(10)); But it's better to make a paragraph in HTML and assign a specific size to it.
24th Jun 2018, 7:03 PM
Tim Thuma
Tim Thuma - avatar
+ 2
Tim Thuma thanks!
24th Jun 2018, 7:05 PM
Eli Ben Shimon
Eli Ben Shimon - avatar