AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

HTML button action - How to create a HTML button action, size

This page shows how to make HTML button onclick and styling them using CSS into different colors and size.

How to create button action in HTML

We show you form with two submit buttons action. First submit button action submits the form data to "action_first_page.php", and the second submit action button to "action_second_page.php":
Example 1:
<!DOCTYPE html>
<html>
<head>
<title>Title of button action</title>
</head>
<body>

<h2>Button onclick</h2>
<form action="/action_first_page.php" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<button type="submit">Submit</button><br>
<button type="submit" formaction="/action_second_page.php">Submit to another page</button>
</form>

</body>
</html>

The html cod above will display this HTML buttons onclick result:

HTML button onclick, button style

Button onclick

Name:
Surname:

HTML button size - How to create button size

That isn't avoiding CSS, it's just using inline CSS instead of an external stylesheet.
Example2:
<!DOCTYPE html>
<html>
<head>
<title>HTML button size</title>
</head>
<body>
<button style="height:100px; width:200px; color:#3a87ad; font-size:18px;"> Your text here </button> /
<button style="height:80px; width:180px; color:red; font-size:16px; background-color:#FF6"> Your text here </button> /
<button style="height:60px; width:160px; color:brown; font-size:14px;"> Your text here </button>
</body>
</html>

This HTML code will produce the following result −
| |


HTML button action, how to create HTML button size
HTML button action - How to create a HTML button action, size - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.