class ListOfStrings(object):

    def __init__(self, *strings):
        self.strings = strings

def _repr_html_(self):
    return ''.join([("<span class='listofstr'>%s</span>" % s) for s in self
        .strings])
display(ListOfStrings('hi', 'hello', 'hello there'))
IPython Notebook: how to display() multiple objects without newline