fix incorrect placement of header and footer elements

This is the correct usage of header elements for html5.

I'll open an issue for the correct handling of RST `header` and `footer` elements.