Example

Select all p elements:

$("p")

Try it yourself »

Definition and Usage

The element selector selects elements with the specific tag name.

The tag name is the text between the < and > of HTML tags.

Syntax

$("tagname")

Parameter Description
tagname Required. Specifies the tag name of the elements to select.