<!DOCTYPE html>
<style>
:root {
     border-collapse: collapse;
     border-spacing: 1px;
}
.cell {
     display: table-cell;
     border: solid black;
}
.pre {
     white-space: pre;
     border: solid blue;
}
</style>
<span class="pre"> <span class="cell">A</span>
<span class="cell">B</span> </span>