Using Css to change Javascript text

I tried some methods I already know but maybe you guys could help me. When I click my login button it takes me to a different page so then I can login and go back to the main page.

We don’t have nearly enough information to help you.

You can not use CSS to change a JS value.

You can, however, use ::before and ::after and the content property.

Is this referring to the same Repl as your other posts?

no this is not the same

Could you post a link to the Repl you’re referring to then?

1 Like

I am just testing this out so…

To style the text Hello world, style the body element:

/* for example */
body {
	color: red; /* change the text to red */

However I would recommend not using document.write to append to the DOM, I would recommend doing something more along the lines of this:

const p = document.createElement("p");
p.textContent = "Hello, world!";
1 Like