Extend generate HTML to include lists