def format_bases(bases):
    """
    Generate HTML that colours the bases in a string.

    Args:
        bases: A string containing a genetic sequence.
    Returns:
        An HTML string.
    """
    formatted = ''
    for b in bases:
        formatted += '<span class="base-{}">{}</span>'.format(b,b)
    return formatted