---
title: "Comment by Mohith Gupta Korangi on \"Pure Vanilla JavaScript Smooth Scroll to Element on <a> anchor tag click #id\" | Hashnode"
description: "But we have a CSS property for smooth-scroll, right?? Why not use it??"
url: "https://hashnode.com/posts/pure-vanilla-javascript-smooth-scroll-to-element-on-lessagreater-anchor-tag-click-id/5f9aaeaaa1658252d1a7b61e/comment/5f9bb5e5ff730d5cb8dedadf"
---

[Discussion](https://hashnode.com/posts/pure-vanilla-javascript-smooth-scroll-to-element-on-lessagreater-anchor-tag-click-id/5f9aaeaaa1658252d1a7b61e)

Comment [Pure Vanilla JavaScript Smooth Scroll to Element on <a> anchor tag click #id](https://hashnode.com/posts/pure-vanilla-javascript-smooth-scroll-to-element-on-lessagreater-anchor-tag-click-id/5f9aaeaaa1658252d1a7b61e)

[Mohith Gupta Korangi](https://hashnode.com/@YouKnowWho)

[Oct 30, 2020](https://hashnode.com/posts/pure-vanilla-javascript-smooth-scroll-to-element-on-lessagreater-anchor-tag-click-id/5f9aaeaaa1658252d1a7b61e/comment/5f9bb5e5ff730d5cb8dedadf)

But we have a CSS property for smooth-scroll, right?? Why not use it??

[Surjith S M](https://hashnode.com/@surjithctly)

[Oct 30, 2020](https://hashnode.com/posts/pure-vanilla-javascript-smooth-scroll-to-element-on-lessagreater-anchor-tag-click-id/5f9aaeaaa1658252d1a7b61e/comment/5f9bb5e5ff730d5cb8dedadf#reply-5f9bcd8e1502575c97127467)

Trust me I tried that as well.. But in some cases you will feel its not flexible. So this will come in handy.
