jQuery :header Selector (original) (raw)
Last Updated : 11 Jul, 2025
The jQuery :header Selector is used to select all the heading elements that are from ( to
. )
Syntax:
$(":header")
Example 1: Change the color of all headings to green.
HTML `
jQuery :header SelectorGeeksForGeeks
jQuery :header Selector
GeeksForGeeks
A computer science portal for geeks.
Sudo Placement
GFG
`
Output:
Example 2: Change the color of all headings to blue by clicking the button.
HTML `
GeeksForGeeks
jQuery :header Selector
GeeksForGeeks
A computer science portal for geeks.
GFG
Change color`
Output:
Supported Browsers: The browser supported by jQuery :Header Selector are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
