Comment creer un bouton avec lien en PHP ou HTML
Il suffit de copier coller le code et de le placer dans la page ou on veut afficher le bouton .
<head>
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50;
}
.button1:hover {
background-color: #4CAF50;
color: white;
}
.button2 {
background-color: white;
color: black;
border: 2px solid #008CBA;
}
.button2:hover {
background-color: #008CBA;
color: white;
}
.button3 {
background-color: white;
color: black;
border: 2px solid #f44336;
}
.button3:hover {
background-color: #f44336;
color: white;
}
.button4 {
background-color: white;
color: black;
border: 2px solid #e7e7e7;
}
.button4:hover {background-color: #e7e7e7;}
.button5 {
background-color: white;
color: black;
border: 2px solid #555555;
}
.button5:hover {
background-color: #555555;
color: white;
}
.Style2 {font-weight: bold}
</style>
</head>
<body>
<a href="https://sites.google.com/site/phpcodesbibliotheque/">
<button class="button button1 Style2">Menu principal</button>
</a>
<a href="https://sites.google.com/site/phpcodesbibliotheque/">
<button class="button button1 Style2">Retour au menu principal</button>
</a>
Style du bouton
Le code proposé contient different styles
on choisi le type de bouton a afficher button1 ou button2 ou … dans la ligne
<button class="button button1 Style2">Retour au menu principal</button>
On choisi le style du bouton
On remplace le texte “ Retour au menu principal “ par le texte qu’on veut afficher
Remplacer https://sites.google.com/site/phpcodesbibliotheque par votre lien
Key words
Code pHP
Créer un bouton HTML
créer un bouton php
code bouton
code pour creer un bouton
format de bouton en php