DOM modification changes the content, attributes, or style of elements: textContent for text (safe), classList for classes, setAttribute for attributes, style for inline styles. innerHTML interprets HTML and exposes you to XSS vulnerabilities with uncontrolled data.
Example
titre.textContent = 'Welcome'
carte.classList.toggle('active')