Generate valid HTML from renderTable