jQuery css() Method
<!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> </head> <body> <p style="background-color: lightblue;">This is a paragraph.</p> <script> // Get the current background color of the first paragraph var color = $("p").css("background-color"); console.log(color); </script> </body> </html>