I am making a HTML website that takes an input
in the id userInput
and was wondering how to take it apart and insert images for the length of userInput
Say for example the userInput
= Hello World
Ideally it would out put the images h.png
e.png
l.png
l.png
o.png
space.png
w.png
o.png
r.png
l.png
d.png
As I do not have the files of each individual letter, I am unable to show how it would ideally look, but hopefully you can help me! Though I know that the font disregards capitals.
Thank you once more!
3
Answers
HTML
JS
}
You just need to write some Javascript to take your input string, convert it to an array, and iterate through the array, creating an HTML string containing the
<img>
tags.