Header selector
The selector :header selects headers h1, h2, h3, h4, h5, h6. Since :header is not part of the CSS specification, it is better to use it in modern browsers to improve performance. First filter the elements using a pure css selector, then apply .filter(':header').
Syntax
This is how we select elements:
$(':header');
Example
Let's change the background of all headings to gray:
<h1>Header h1</h1>
<p>text</p>
<h2>Header h2</h2>
<p>text</p>
$(':header').css({background: '#ccc'});