<input type="text" pattern="\d*" placeholder="Example: 0000 0000 0000 0000"/>

html {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.2);
  width: 200px;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.