Do you know how to code buttons
ZakMcCall (1)

Thx in advance. I need this for a light mode and a dark mode

You are viewing a single comment. View All
OldWizard209 (1631)

The simplest way to create a button in HTML, would be using an anchor tag, but change its look using CSS. So here would be the HTML:

<a class="link" href="https://replit.com/~">Button</a>

Embed this HTML in a HTML boilerplate.

And here is the CSS:

.link:link, .link:visited {
  background-color: #0de1e9;
  color: white;
  padding: 14px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.link:hover, .link:active {
  background-color: 0de1e9;
}

This is the fastest way to make a working button. But this is not enough. To make an actual button use a <button> tag.