static void tag ( StringBuilder sb , String color , String text ) { sb . append ( "<span class='label label" ) ; if ( color != null ) { sb . append ( "-" ) . append ( color ) ; } String classText = text . replace ( ' ' , ' ' ) ; sb . append ( " l-" ) . append ( classText ) . append ( "'>" ) . append ( text ) . append ( "</span>" ) ; }
Make an html bootstrap tag with our custom css class .