jQuery HTML/CSS Methods Complete Reference

Last Updated : 23 Jul, 2025

JQuery provides methods to control the DOM inefficient way.  JQuery provides methods that act as getter, retrieving information from DOM elements like .attr(), .html(), and .val().

All the selectors included in CSS are supported in jQuery. jQuery CSS Methods are used to apply CSS properties on DOM elements.

Syntax:

$(selector).method(attribute.., function..)

Example: Set text syntax

HTML
<!DOCTYPE html>
<html>

<body>
    <h1>
    <center>
    Geeks <button onclick="function()">Click me
        </button>
    </center>
</h1>

    <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
    <script>
        $(document).ready(function() {
            $("button").click(function() {
                $("p").text("Jquery_text_method");
            });
        });