you can do it with javascript but let's keep on html5 and css as you can see here:
Use maxlenght atribute:
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
<input type="text" name="my_text[]" maxlength="1" style="float:left">
Remember to create a class or use bootstrap class float-left, I used an inline css but that's not a good practice.
If you need a different border on input you can do it with css:
<input type="text" name="my_text[]" maxlength="1" class="my_text">
<style>
.my_text{
border: 1px solid #000;
float:left;
}
</style>