---
title: "How to make a hyperlink that works like a button?"  
description: "How to make a hyperlink that works like a button?"  
author: "Revati S Misra"  
published: 2023-08-29  
updated: 2023-09-02  
canonical: https://www.mindstick.com/forum/159724/how-to-make-a-hyperlink-that-works-like-a-button  
category: "html"  
tags: ["html", "html element"]  
reading_time: 2 minutes  

---

# How to make a hyperlink that works like a button?

How to make a hyperlink that works like a [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net)?

## Replies

### Reply by Aryan Kumar

To make a hyperlink that works like a button, you can wrap the hyperlink in an `<a>` tag with the `button` type attribute. The `button` type attribute tells the browser to render the hyperlink as a button.

The following code shows how to make a hyperlink that works like a button:

HTML

```plaintext
<a href="https://www.google.com" type="button">Google</a>
```

In this code, the `<a>` tag has the `href` attribute set to the URL of Google and the `type` attribute set to `button`. This will render the hyperlink as a button that, when clicked, will navigate to the Google website.

You can also style the button using CSS. The following CSS code shows how to style the button to have a blue background and white text:

CSS

```plaintext
a.button {
  background-color: blue;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
}
```

In this code, the `a.button` selector is used to select all hyperlinks with the `button` type attribute. The `background-color` property is set to blue, the `color` property is set to white, the `padding` property is set to 10px 20px, and the `border-radius` property is set to 5px.


---

Original Source: https://www.mindstick.com/forum/159724/how-to-make-a-hyperlink-that-works-like-a-button

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
