html_table

emlib.misc.html_table(rows, headers, maxwidths=None, rowstyles=None, tablestyle='', headerstyle='')[source]

Create a html table

Parameters:
  • rows (list) – the rows of the table, where each row is a sequence of cells

  • headers (list[str]) – a list of column names

  • maxwidths (Optional[list[int]]) – if given, a list of max widths for each column

  • rowstyles (Optional[list[str]]) – if given, a list of styles, one for each column

  • tablestyle – a style applied to the entire table

  • headerstyle – a style applied to the table header

Return type:

str

Returns:

a string with the generated HTML