"; 2. Use the button tag, the syntax is "" ."/> "; 2. Use the button tag, the syntax is "" .">
Home >Web Front-end >HTML Tutorial >How to write button in html
How to write the html button: 1. Use the input tag, the syntax is ""; 2. Use the button tag, the syntax is "Button text".
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
How to write the html button:
##1. Use the input tag
<input type="button" value="保存"/>According to different type attribute values, the input field has many forms. Input fields can be text fields, checkboxes, masked text controls, radio buttons, buttons, etc. A simple HTML form, including two text input boxes and a submit button:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>button</title> </head> <body> <form action="form_action.asp" method="get"> First name: <input type="text" name="fname" /> Last name: <input type="text" name="lname" /> <input type="submit" value="Submit" /> </form> </body> </html>Output result:
2. Use the button tag
<button>保存</button>
The above is the detailed content of How to write button in html. For more information, please follow other related articles on the PHP Chinese website!