Page 143 - Computer Genius Class 08
P. 143
Info Hub: Introduction to JavaScript
In the previous classes, we have learnt to create web pages using HTML. HTML uses many tags
to tell the browser how to display the content on web browsers. The web pages we have learnt to
create were static in nature which were not interactive. We need to use another scripting language
along with HTML to make web pages interactive and dynamic in nature. JavaScript is one of such
types of scripting languages.
JavaScript—A Scripting Language
JavaScript, often abbreviated as JS, is a client-side scripting language used for enhancing users’
interaction with the web page by making web pages dynamic. The meaning of client-side scripting
language is that the code written in JavaScript is interpreted by the web browser on which the web
page is running. With the help of JavaScript, we can add different types of functionalities in our web
pages like taking input from the user, validating the user input, displaying pop-up boxes, etc.
Alongside HTML5 and CSS, JavaScript is one of the core languages of the World Wide Web (WWW).
It was developed by Brendan Eich, a Netscape Communications Corporation programmer, in 1995.
He takes only ten days to develop the language.
Features of JavaScript
Some of the important features of JavaScript are as follows:
It is used in both client-side and server-side applications.
It is platform independent; hence, it runs on many operating systems.
It is used with HTML code and run on web browsers.
It is a case-sensitive and interpreted language.
It is used to validate user input for errors.
Using JavaScript
JavaScript cannot run on its own because it is a scripting language, and hence, needs to be embedded
within an HTML code.
In HTML5, we can use JavaScript in two ways: internally and externally.
Internal JavaScript
When JavaScript code is written within the HTML web page then it is called internal JavaScript.
We use the <SCRIPT> and </SCRIPT> tags to place the JavaScript codes either in the <HEAD> or
<BODY> tag of the HTML5 document.
Introduction to JavaScript 141

