how to add button in html ?
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.
Voters
RamBarabdeCoder
Thank you all
@Aphmeta ,@InvisibleOne,@ruiwenge2 and moreInvisibleOne
In the HTML file
<button onclick="alert('You clicked me!');">Click Me!</button>
then in the css
button { padding: 15px; font-size: 10px; color: white; font-family: 'Trebuchet MS'; background-color: darkgrey; border-radius: 5px; border: 6px solid black; }
Something like that
RamBarabdeCoder
@InvisibleOne thanks
RamBarabdeCoder
Can Any one tell me that when the cursor will goto the button then how it will change color
ruiwenge2
@RamBarabdeCoder in css:
button:hover { background: blue; }
ruiwenge2
<button>Text</button>
[deleted]
@ruiwenge2 u forgot about href and he also asked for color code
[deleted]
@ruiwenge2 and u need to specify the language as html when u put code markdown like
<button href="https://www.youtube.com">YouTube</button>
RamBarabdeCoder
@Aphmeta Thank you
RamBarabdeCoder
@ruiwenge2 Thank you
I can help you! The way to create a button is like this:
To change the color, you can do:
and in the CSS file u do:
and boom ur done
If my comment answered the question then select the green check mark next to it, thanks!
np
@RamBarabdeCoderDoesn't work. Copied and pasted!