# How to convert a button into a link

This article will show you how to convert a button on your page to a link

* [Step 1 - Locate button in the html](#howtoconvertabuttonintoalink-step1-locatebuttoninthehtml)
* [Step 2 - Adjust the code](#howtoconvertabuttonintoalink-step2-adjustthecode)
* [Step 3 - Save html and check work](#howtoconvertabuttonintoalink-step3-savehtmlandcheckwork)

### Step 1 - Locate button in the html <a href="#howtoconvertabuttonintoalink-step1-locatebuttoninthehtml" id="howtoconvertabuttonintoalink-step1-locatebuttoninthehtml"></a>

Open the html editor and search to find the button to convert into a link

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FHw2Aw0v52vaiduWi8EZX%2Fimage.png?alt=media&#x26;token=c0ea4aa5-f10d-46a6-96c9-5e1057204e69" alt="" width="375"><figcaption></figcaption></figure>

### Step 2 - Adjust the code <a href="#howtoconvertabuttonintoalink-step2-adjustthecode" id="howtoconvertabuttonintoalink-step2-adjustthecode"></a>

The button element opens with “\<button”, contains a “data-id” (amongst other values) and then closes with “/button>”

To turn this into a link, change the opening and closing tags to “a” and adjust the “data-id” to be just “id” and change “button” to “link”

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FWpJANgr21ZX0QwuihbLK%2Fimage.png?alt=media&#x26;token=0c4f182d-dfbb-4f77-be6d-97a9a63f93fe" alt="" width="375"><figcaption><p>Remember to save after changes</p></figcaption></figure>

### Step 3 - Save html and check work <a href="#howtoconvertabuttonintoalink-step3-savehtmlandcheckwork" id="howtoconvertabuttonintoalink-step3-savehtmlandcheckwork"></a>

After you make the adjustments, click the **Save** button on the bottom right of the editor

Then click on the element on the page to confirm it now has the Link functionality
