Home > Article > Web Front-end > Which tags can be used to create html buttons (detailed explanation with pictures and text)
People who often write pages or frequently browse websites must be familiar with buttons. Friends who are learning HTML and CSS, can you write HTML button code? What tags can be used to create buttons? This article will introduce three tags (methods) for making HTML button styles based on examples. It has certain reference value and interested friends can take a look.
Making buttons requires a certain foundation of HTML and CSS. If you are unclear, you can refer to the relevant articles on the PHP Chinese website, or visit HTML video tutorial, CSS video tutorial , I hope this can help you.
Method 1: button tag
Instance description: Use the
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .button{border: none;background: green;padding: 15px 30px;font-size: 20px;color: white;cursor: pointer;} </style> </head> <body> <button class="button">button</button> </body> </html>
The effect is as shown in the picture:
Method 2:Tag
Rendering:Summary: Make html button There are three methods, one is button tag, one is a tag, and one is input tag (input tag is divided into two types, submit button and reset button). The specific tag to choose depends on personal habits and work. Needed.
The above introduces to you which tags can be used to make buttons. Beginners must try it by themselves to see if they can make more beautiful buttons. I hope this article will be helpful to you! For more related tutorials, please visitThe above is the detailed content of Which tags can be used to create html buttons (detailed explanation with pictures and text). For more information, please follow other related articles on the PHP Chinese website!