# Browser history Back Button?

**URL:** <https://community.hubspot.com/t/browser-history-back-button/120996>\
**Category:** Blog, Website & Page Publishing\
**Tags:** website-pages, enterprise\
**Created:** [November 20, 2024, 5:35pm UTC](https://community.hubspot.com/t/browser-history-back-button/120996 "2024-11-20T17:35:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RMacFarland](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RMacFarland](https://community.hubspot.com/u/RMacFarland)\
**Post date:** [November 20, 2024, 5:35pm UTC](https://community.hubspot.com/t/browser-history-back-button/120996/1 "2024-11-20T17:35:41Z")

</div>

How do I create a “back button” in a webpage?  
Everyone says to use anchors, but I have no idea where they are coming fron, so I want to recall the browser history, and go “BACK”…  
The html is:  
\<button onclick=“history.back()”\>Go Back\</button\>  
Can I use that, and how?

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [November 20, 2024, 7:21pm UTC](https://community.hubspot.com/t/browser-history-back-button/120996/2 "2024-11-20T19:21:22Z")

</div>

Hi @RMacFarland,

You can set up a button like that by editing or creating a custom module.

Here is some helpful documentation on how to [set up and edit custom modules](https://knowledge.hubspot.com/design-manager/create-and-edit-modules) in HubSpot.

If creating a module, it could be as simple as:

HTML Box

`<button id="backButton" onclick="history.back()">Go Back</button>`

CSS Box (Sample styling applied)

```lia-code-sample
<style>
 #backButton {
 background-color: #23406F;
 color: #f8f8f8;
 border: none;
 border-radius: 10px;
 padding: 10px 20px;
 font-size: 16px;
 font-weight: bold;
 cursor: pointer;
 }

 #backButton:hover {
 background-color: #FFFFFF;
 color: #23406F;
 }
</style>

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![RMacFarland](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RMacFarland](https://community.hubspot.com/u/RMacFarland)\
**Post date:** [November 20, 2024, 11:48pm UTC](https://community.hubspot.com/t/browser-history-back-button/120996/3 "2024-11-20T23:48:25Z")

</div>

That would do the trick!  
Thank you !
