can we generate text using HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

can we generate text using HTML

as i have seen in canvas

20th Jul 2019, 9:56 PM
Aman Rajput
Aman Rajput - avatar
1 Answer
+ 3
I'm pretty sure you meant display. Yes, you can display text, either with the fillText or the strokeText method: they require 3 parameters, the text, x position and y position. Since it is the canvas, you obviously cannot define everything in one line, for which there are methods/properties such as textAlign, textBaseline, or font. Next time if you ask a question, please try to make it as clear as possible so we can answer you well and you can get a great answer and everybody will have a good time! ^^
20th Jul 2019, 10:05 PM
Airree
Airree - avatar