<!DOCTYPE html>
<style>
body {
margin: 0;
font: 20px/24px monospace;
}
.spacer {
color: transparent;
}
.box {
display: inline-block;
width: 20px;
height: 20px;
vertical-align: top;
background: green;
}
</style>
<span class="spacer">MMMM</span><span class="box"></span>