jQuery css() Method (original) (raw)
Last Updated : 07 Jul, 2023
The **css() method in **jQuery is used to change the style property of the selected element. This method can be used in different ways. The css() method can be used to get/return the present value of the property for the selected element.
**Syntax:
$(selector).css(property)
or
$(selector).css(property, value)
or
$(selector).css(property, function(index, currentvalue))
or
$(selector).css({property:value, property:value, ...})
**Return value: It will return the value of the property for the selected element.
**Example 1: In this example, we will use css() method to get the text color of the paragraph element.
HTML `
Click here and the padding will change.Welcome to gfg!.
`
**Output:

**Example 4: In this example, we will use css() method to apply multiple CSS properties simultaneously.
HTML `