gothictrade
Well-Known Coder
So I am using VSCode & I have an HTML document and a CSS file. I have a link inside of the HTML index file, linking to the external CSS file.
For JavaScript, I have some lines of code from a tutorial:
I'm wondering where exactly I put this?
Do I put it inside of the HTML document? Within which tags? Do I put it in the CSS sheet? Where? With the "p" information? Or do I have an external Javascript Sheet like CSS?
For JavaScript, I have some lines of code from a tutorial:
JavaScript:
const para = document.querySelector('p');
para.addEventListener('click', updateName);
function updateName() {
let name = prompt('Enter a new name');
para.textContent = 'Player 1: ' + name;
}
I'm wondering where exactly I put this?
Do I put it inside of the HTML document? Within which tags? Do I put it in the CSS sheet? Where? With the "p" information? Or do I have an external Javascript Sheet like CSS?