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 cellsheaders (
list[str]) – a list of column namesmaxwidths (
Optional[list[int]]) – if given, a list of max widths for each columnrowstyles (
Optional[list[str]]) – if given, a list of styles, one for each columntablestyle – 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