title: How to style a credit card expiration date input field to include spaces and forward slash?
body: <p>I am wondering how I can <strong><em>style</em></strong> one input field (type = text) to display with spaces and a slash between numbers, like this:</p>
  
  <p><img src="https://i.stack.imgur.com/eNTTg.png" alt="Credit card expiry field"></p>
  
  <p>I know how to constrain the input to digits and perform validation. That's not what I'm asking. I'm wondering about the actual display. Can you use CSS to do this somehow, splitting the first two MM digits from the last two YY digits? </p>
  
  <p>I want the user to be able to type 4 digits only and have it display as: MM / YY</p>
  
  <p>(Different question from <a href="https://stackoverflow.com/questions/17017136/how-to-format-credit-card-input-fields-and-expiry-date">How to format credit card input fields and expiry date</a>. That question focuses on validation.)</p>