Skip to content
Sign upLog in

how to add button in html ?

Profile icon
RamBarabdeCoder

plz tell how to add it and then plz give codes and also any new thing you about buttons like color changing and many things in html language.

You are viewing a single comment. View All
Profile icon
[deleted]

I can help you! The way to create a button is like this:

<button href="(location where u want the user to go after clicking on it)">Name of the button</button>

To change the color, you can do:

<button id="button-red">This is a button that is red</button>

and in the CSS file u do:

#button-red { background-color: red; }

and boom ur done

Profile icon
[deleted]

If my comment answered the question then select the green check mark next to it, thanks!

Profile icon
RamBarabdeCoder

@Aphmeta
Thank You

Profile icon
InvisibleOne

np

@RamBarabdeCoder

Profile icon
Nuker13764

Doesn't work. Copied and pasted!