'Create HTML table, used for displaying peek'

def make_html_table(self, dataset, skipchars=None):

    if (skipchars is None):
        skipchars = []
    out = ['<table    cellspacing="0"    cellpadding="3">']
    try:
        out.append('<tr>')
        for (i, name) in enumerate(self.column_names):
            out.append(('<th>%s.%s</th>' % (str((i + 1)), name)))
        if ((dataset.metadata.columns - len(self.column_names)) > 0):
            for i in range(len(self.column_names), dataset.metadata.columns):
                out.append(('<th>%s</th>' % str((i + 1))))
            out.append('</tr>')
        out.append(self.make_html_peek_rows(dataset, skipchars=skipchars))
        out.append('</table>')
        out = ''.join(out)
    except Exception as exc:
        out = ("Can't    create    peek    %s" % exc)
    return out
