> For the complete documentation index, see [llms.txt](https://kkishan114.gitbook.io/10-days-of-javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kkishan114.gitbook.io/10-days-of-javascript/index/day-8-create-a-button.md).

# Day 8: Create a Button

### Problem Link <a href="#problem" id="problem"></a>

* [x] [**HackerRank Problem Link**](https://www.hackerrank.com/challenges/js10-create-a-button)

### Solution

* [x] **HTML + CSS + JS Solution**

{% code title="btn.css" %}

```css
#btn {
  width: 96px;
  height: 48px;
  font-size: 24px;
}
```

{% endcode %}

{% code title="btn.js" %}

```javascript
function increment() {
  btn.innerHTML++;
}
```

{% endcode %}

{% code title="btn.html" %}

```markup
<!-- Enter your HTML code here -->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <!-- HTML -->
        <button id="btn" onclick="increment()">0</button>
    </head>
    <body>
        <script src="js/button.js" type="text/javascript"></script>
    </body>
</html>
```

{% endcode %}
