const element = document.getElementById('anchor-name') element.scrollIntoView({ behavior: 'smooth', block: 'start' });