Section 1
Click on the link to see the "smooth" scrolling effect.
Click Me to Smooth Scroll to Section 2 BelowNote: Remove the scroll-behavior property to remove smooth scrolling.
Is there a method in html which makes the webpage scroll to a specific Element using HTML !?
The above answers are good and correct. However, the code may not give the expected results. Allow me to add something to explain why this is very important.
It is true that adding the scroll-behavior: smooth to the html element allows smooth scrolling for the whole page. However not all web browsers support smooth scrolling using HTML.
So if you want to create a website accessible to all user, regardless of their web browsers, it is highly recommended to use JavaScript or a JavaScript library such as jQuery, to create a solution that will work for all browsers.
Otherwise, some users may not enjoy the smooth scrolling of your website / platform.
I can give a simpler example on how it can be applicable.
Smooth Scroll
Section 1
Click on the link to see the "smooth" scrolling effect.
Click Me to Smooth Scroll to Section 2 Below
Note: Remove the scroll-behavior property to remove smooth scrolling.