<!DOCTYPE HTML> <html> <head> <style> span { display:inline-block; width:100px; height:10px; background:yellow; } </style> </head> <!-- Test that justify actually works. 3 spans won't fit on a line so there will be two spans plus 100px of justification space on the first line. --> <body style="text-align:justify; width:300px;"> <span></span> <span></span> <span></span> </body> </html>