xxxxxxxxxx
button{
/*Change the width as much as you like, but make sure
margin-left and margin-right + width = 100%*/
width:50%;
margin-left:25%;
margin-right:25%;
}
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<style>
/* Styles for centering the button */
.centered-button {
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div class="centered-button">
<button>Centered Button</button>
</div>
</body>
</html>