buttons in html
The <button> tag defines a clickable button.
Inside a <button> element you can put content, like text or images. This is the difference between this element and buttons created with the <input> element.
Always specify the type attribute for a <button> element. Different browsers use different default types for the <button> element.
<!DOCTYPE html>
<html>
<body>
<h2>The Button Element</h2>
<button type="button" onclick="alert('Hello world!')">Click Me!</button>
</body>
</html>
Output:
Comments
Post a Comment