---
title: "Discussion on \"How to create a scroll to top button with vanilla JS & CSS\" | Hashnode"
description: "Discussion on \"How to create a scroll to top button with vanilla JS & CSS\". In this tutorial, you will learn in a few short steps how to create a scroll to top button with CSS inset shorthand and vanilla JavaScript.\nScroll to top button can be very helpful for websites with lots of content, pages with infinite scrolling, or ..."
url: "https://hashnode.com/posts/how-to-create-a-scroll-to-top-button-with-vanilla-js-and-css/62a472fea2c282d2d8379026"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to create a scroll to top button with vanilla JS & CSS](https://amirlotfi.hashnode.dev/how-to-create-a-scroll-to-top-button-with-vanilla-js-and-css?utm_source=hashnode&utm_medium=feed)

In this tutorial, you will learn in a few short steps how to create a scroll to top button with CSS inset shorthand and vanilla JavaScript. Scroll to top button can be very helpful for websites with lots of content, pages with infinite scrolling, or ...

Jun 11, 2022 · 4 min read · amirlotfi.hashnode.dev  
Read the article

-   [#html5](https://hashnode.com/tag/html5)
-   [#css3](https://hashnode.com/tag/css3)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Amir Lotfi](https://hashnode.com/@amirlotfi)

@amirlotfi

  
[View profile](https://hashnode.com/@amirlotfi)

web development

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
