An Intro to jQuery

HTML, CSS, and JavaScript are the three basic web languages. We build our websites with HTML, style them with CSS, and add JavaScript for interactive functionality. 

JQuery is a JavaScript library. It is not a programming language, but it is a tool used to write standard JavaScript short tasks. jQuery has the added advantage of working with a shortcut.

Hello World!

By comparing the word “Hello, World!” Program on both JavaScript and jQuery, See the difference.


document.getElementById("demo").innerHTML = "Hello, World!";


$("#demo").html("Hello, World!");

How to add jQuery to a web project

jQuery is a JavaScript file that you will link to in your HTML. There are two ways to install jQuery in a project:

  1. Downloada local copy.
  2. Link to a file via Content Delivery Network (CDN).

JQuery CDN

<script src=""></script>

HTML structure and save it as index.html.

<!doctype html>
<html lang="en">
        <title>jQuery Demo</title>

        <script src=""></script>
            //write your query code  here