Easy Tutorial
❮ Html Prependto Misc Jquery Readyexception ❯

jQuery .class Selector

jQuery Selectors

Example

Select all elements with class "intro":


Definition and Usage

The .class selector selects all elements with the specified class.

The class refers to the class attribute of an HTML element.

The class attribute is used to set specific styles for multiple HTML elements.

Note: Do not start the class attribute with a number! It may cause issues in some browsers.


Syntax

Parameter Description
class Required. Specifies the class of the elements to select.

Try it - Example

Select all p elements with class "intro"


jQuery Selectors

❮ Html Prependto Misc Jquery Readyexception ❯