The problem is that your mixing inline content and block level content.
you have inline content, the H1 and paragraph before the table, and again the H2 and paragraph after the table
Add a div around the first H1 and paragraph, another div around the table and another around the H2 and paragraph that are after the table. you may need to also set widths for these divs.