I’d like to make the browser to scroll the page to a given anchor, just by using JavaScript.
I have specified a name or id attribute in my
the easiest way to to make the browser to scroll the page to a given anchor is to type in your style.css *{scroll-behavior: smooth;} and in your html navigation use #NameOfTheSection
*{scroll-behavior: smooth;}
Home
other sections
other sections
other sections
other sections
other sections
other sections
other sections
other sections
other sections
other sections
other sections
other sections
other sections
it will scroll down to this section