here's the html code :
<p id="Message" value="This is the home message">Computers are fast !</p>"
I want to store the message part (Computers are fast !) in a Javascript variable using .getAttribute
What should I add in .getAttribute('')?
let message = document.querySelector('#Message').getAttribute('');
let internal = document.querySelector('#Message').getAttribute('value');
Nothing. It isn't an attribute. The text content of an element is found in the textContent property.
It's an InnerHTML
let message = document.querySelector('#Message').innerHTML;