Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to create button in html code ?
Posted
Comments
Thanks7872 17-Mar-15 4:29am    
Do you have access to google.com?

Why stop at button? You need the whole suite, check this out: Beginner's Guide to HTML5 & CSS3 - Formidable Forms with HTML5[^]
 
Share this answer
 
<!DOCTYPE html>
<html>
<body>
<button type="button" >Click Me!</button>
</body>
</html>
 
Share this answer
 
v2
We can create the HTML button by the two basic ways, one is using tag, and the another one is using tag,

Using the Tag:

<input type="button" value="Click me!" onclick="JavaScript:alert('Thanks... I feel much better now!')" />

Using the Tag:

<button type="button" onclick="JavaScript:alert('Once upon a time, there lived a princess and a frog. They both got married and lived happily ever after. The end.')">

HTML Button with Image:

<button type="button" onclick="JavaScript:alert('Once upon a time, there lived a princess and a frog. They both got married and lived happily ever after. The end.')">
<img src="/pix/web_graphics/free_website_graphics/icons/books/book13.gif" alt="Read book" />
<br />Read Book!&lt;/button>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900