Browser history Back Button?

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?

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 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)

<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!

That would do the trick!
Thank you !