# Add a back button to your app

> In this article, we'll go over how to create a back button that functions the same way as your built-in browser back button

Source: https://tadabase.com/docs/learn/how-to-add-a-back-button-to-your-app  
Status: Not yet re-checked. Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

In this article, we'll go over how to create a back button that functions the same way as your built-in browser back button

First, we'll need to add an HTML component to the page you want to add a back button

![Screenshot for “How to add a back button to your app”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2020-04/scaled-1680-/image-1586819660987.png)

Then we'll need to add the following code to the Source code of the HTML component

```html
<p><button class="btn btn-primary back-btn">Back</button></p>
```

![Screenshot for “How to add a back button to your app”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2020-04/scaled-1680-/image-1586819677995.png)

And to finish off, we'll need to add the following code to the JavaScript section of the page.

```
$('.back-btn').on('click',function(){
    window.history.back();
});
```

![Screenshot for “How to add a back button to your app”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2020-04/scaled-1680-/image-1586819692010.png)
