Query Selector Problem

Dear all,
Good morning,

I am using query selector method and innerHTML property so i can interact with webpages using javascript.
I have a question about it , how can i add a space between a string and the query method ? . Specifically in the picture i attach you will find this message:
The message to shout out today is:HAVE A BEAUTIFUL MONDAY
there i want to add a space between is: and the word HAVE, so i was trying to add spaces and quotes plus + like when we use concatenation but it doesn´t work.
I attach here my code and the final result of it.


I will appreciate if you can give me a hint or advise so i can add some space using query selector and innerHTML. Thank you in advance to everyone :pray: Have a beautiful monday !!

you are using a template litera, you can add those things in the template literal around the variable, and they will apeear (without the +)

about the space, HTML collapse consecutive spaces to a single one. You can probably use codes like   maybe

1 Like