<!doctype html>
<head>
<style>
    span {
        display: inline;
    }
    .block {
        font-family: Arial;
        display: inline-block;
        padding: 5px;
        margin: 5px;
        border: 1px solid red;
    }
</style>
</head>
<body>
<div class="block">A</div><span><div class="block">A</div><span><div class="block">A</div><span><div></div><div></div><div></div><div></div><div></div><div></div><div></div></span><div class="block">B</div></span><div class="block">B</div></span><div class="block">B</div>
</body>
