Example-1: Example of adding an onclick event to the <button> tag
অবশ্যই Html area তে গিয়ে কোডিং করতে হবে। বাটনের কালার চেঞ্জ করা যাবে না।
Title of the document
Code:
html> <html><head><title>Title of the document</title></head><body><buttononclick=“window.location.href=’https://w3docs.com’;”> Click Here </button></body></html>
বাটনের ভিতরের লিখাগুলোর কালার চেঞ্জ করা যাবে।
Title of the document
Ordinary button
Button with red text
Button with increased font size
Code:
<!DOCTYPE html><html><head><title>Title of the document</title></head><body> Ordinary button <buttontype=“button”>Add to the recycle bin</button><hr /> Button with red text <buttontype=“button”style=“color: red;”><b>HTML Book </b></button><hr /> Button with increased font size <buttontype=“button”style=“font: bold 14px Arial;”>Download the book </button><br /></body></html>
এই নির্দিষ্ট কালার দেখাবে
Example of creating a button acting as a link with the “action” attribute
Title of the document
Code:
html> <html><head><title>Title of the document</title></head><body><formaction=“http://rashedweb.com/”><buttontype=“submit”>RashedWeb</button></form></body></html>