What you’re observing is the intentional behavior of modern browsers. In fact, for quite some time users here on Stack Overflow would ask how to achieve this behavior, prior to it seeing broad support in browsers.
My suggestion would be to leave this behavior as-is, since it provides important context across page-breaks. After all, if you provide 6 pages of tabular data, and page 3 is reviewed on its own, how will the handler know what data is represented by the values unless there is a header to explain the information?
If you feel strongly that the repeated header is not needed, then there may be another approach you can take. You could show the thead for web-viewers, and replace it with a single tr (containing the same information) for printed viewers. For example:
2
Answers
What you’re observing is the intentional behavior of modern browsers. In fact, for quite some time users here on Stack Overflow would ask how to achieve this behavior, prior to it seeing broad support in browsers.
My suggestion would be to leave this behavior as-is, since it provides important context across page-breaks. After all, if you provide 6 pages of tabular data, and page 3 is reviewed on its own, how will the handler know what data is represented by the values unless there is a header to explain the information?
If you feel strongly that the repeated header is not needed, then there may be another approach you can take. You could show the
thead
for web-viewers, and replace it with a singletr
(containing the same information) for printed viewers. For example:You wouldn’t want the faux-header visible by default, and you wouldn’t want the
thead
to be visible in a printed context:use td instead of th tag for quick fix like
<td>Preventive Care</td>