HTML <button> formmethod Attribute

Example A form with two submit buttons. The first submit button submits the form data with method=”get”, and the second submits the form data with method=”post”: <form action=”/action_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> <button type=”submit” formmethod=”post”>Submit using POST</button> </form> Try it Yourself » Definition and Usage The formmethod attribute specifies which HTTP method to use when sending the […]

HTML5 Style

Style Guide and Coding Conventions HTML Coding Conventions Web developers are often uncertain about the coding style and syntax to use in HTML. Between 2000 and 2010, many web developers converted from HTML to XHTML. With XHTML, developers were forced to write valid and “well-formed” code. HTML5 is a bit more sloppy when it comes […]