jQuery Syntax

In this tutorial you will learn about the jQuery Syntax and its application with practical example.

With jQuery statement we usually select (query) HTML elements and perform certain actions on them. jQuery statements are very quick and efficient for selecting and performing actions on any HTML element.

Table Of Contents

Syntax:-

JQuery statement typically begins with a dollar sign ($) and ends with a semicolon (;). Above is the general syntax of a jQuery statement, here –
$ :- A dollar sign ($) is just an alias to define/access jQuery.
(selector) :- A (selector) to select or access HTML elements from DOM.
action() :- It represents an action to be performed on the selected element(s).

It applies border to the current element.

It applies border to all <p> elements.

It applies border to all elements with class=”example”.

It applies border to the element with id=”example”.

In this tutorial we have learn about the jQuery Syntax and its application with practical example. I hope you will like this tutorial.