0

how do i add a welcoming message with a font and all only using js at the start of the game?

the hangman project https://code.sololearn.com/WCvDAxCzbbkw/?ref=app

4th Aug 2022, 4:20 PM
k gready
k gready - avatar
9 Respostas
+ 3
You can create html and set css via js.
5th Aug 2022, 8:22 AM
Lisa
Lisa - avatar
+ 2
You can create the html element using javascript and display it with html (and get input using js and html)
4th Aug 2022, 5:19 PM
Lisa
Lisa - avatar
+ 2
You cannot much style the prompt() or alert(). That is why I suggested using html (via javascript)
5th Aug 2022, 8:01 AM
Lisa
Lisa - avatar
0
It needs to be in the console pop-out
4th Aug 2022, 6:17 PM
k gready
k gready - avatar
0
What did you mean by "console pop-out"?
5th Aug 2022, 3:34 AM
Ipang
0
Ipang the game's splash screen
5th Aug 2022, 6:55 AM
k gready
k gready - avatar
0
I think you can create a <div>, style the <div> and its content using CSS as you see fit. Then just set <div> CSS display to 'none'. When you want it to show up, you can adjust the <div> CSS display to 'block' in order to show the <div> using JS. Easier to update/maintain this way rather than using JS to create the <div> and its contents.
5th Aug 2022, 7:39 AM
Ipang
0
Yeah but I can only use js.no html or css
5th Aug 2022, 8:17 AM
k gready
k gready - avatar
0
Let me change the question-how do I make a figlet Header in the splash screen?
5th Aug 2022, 4:27 PM
k gready
k gready - avatar