How do I center this form in css?

Another way

body {
    text-align: center;
}
form {
    display: inline-block;
}
<body>
  <form>
    <input type="text" value="abc">
  </form>
</body>

Leave a Comment