JavaScript Introduction

What is Javascript?

Javascript (JS) is a high-level, interpreted programming language used in web development.

It is a language which is also known as dynamic, loosely typed and multi-paradigm.

Along with HTML and CSS, Javascript is one of the three main technologies of the World Wide Web.

Brief history of Javascript

JavaScript was created by Brendan Eich(a Netscape Communications Corporation programmer) in 1995.

Eich took only 10 days to develop the scripting language known as Mocha.

When it was first delivered, it was made for Netscape Navigator and quickly became popular as LiveScript.

The name was changed to JavaScript later on to reflectNetscape’s support of Java within its browser.

It was a “marketing strategy” to connect a brand new language (JavaScript) to a widely popular language (Java), regardless of that JavaScript and Java have nothing in common.

At that time, there were two dominating web browsers i.e., Netscape Navigator (with JavaScript) and Internet Explorer (with JScript).

By 1996, JavaScript’s popularity grew so much that it was handed over to an international standards scripting language body called ECMA (European Computer Manufacturers Association) that is responsible for the development and upkeep of this language.  

So the scripting language was officially named as ‘ECMAScript’. However people still call it JavaScript.

Usage of JavaScript

  • Client-side validation
  • Dynamic drop-down menu
  • Displaying date and time at any moment
  • Validate user input in an HTML form before form submission(sendingthe data to a server)
  • Build forms that respond to user input without involving a serverrequest
  • Change the appearance of HTML elements
  • Open, close and redirection of new windows or frames
  • Manipulate HTML layers  likehiding, moving, and allowing the user to drag them around a browser window
  • Build complete client side programs
  • Displaying popup windows and dialog boxes (e.g., alert dialog box,confirm dialog box and prompt dialog box)
  • Displaying clocks

Advantages of JavaScript

  • Speed. Client-side JavaScript is very fast because it can be run without  server-side access.
  • Simplicity: JavaScript is easier to learn and implement.
  • Popularity:  JavaScript is used almost everywhere in web design and development industry. StackOverflow and GitHub have many projects using Javascript. The language has gained a lot of traction in the industry in recent years.
  • Interoperability: JavaScript can be inserted into any web page regardless of the file extension or inside scripts written in other languages like Perl and PHP.
  • Server Load: Being client-side reduces the demand on the website server thereby decreasing overall load.
  • Rich interfaces: Drag and drop components or slider gives a rich interface to your website with the use of JavaScript.
  • Extended Functionality: Third party add-ons like Greasemonkey has enabled JavaScript developers to write of JavaScript snippets that can be executed on desired web pages to extend its functionality.
  • Versatility: There are many ways to use JavaScript through Node.js server nowdays e.g., if it is bootstrap node.js with Express, a document database like mongodb must be used. JavaScript is also used in the front-end for clients. It is possible to develop an entire app from front to back end using only JavaScript.
  • Updates: Since the advent of EcmaScript 5, ECMA International has dedicated to continue updating JavaScript annually.

Disadvantages of JavaScript

  • Client-Side Security: As the code is executed on the users’ computer, in some cases it can be exploited for malicious purposes which are not desirable.
  • Browser Support: JavaScript is interpreted differently by different browsers whereas server-side scripts will always produce the same output. Client-side scripts can be a little unpredictable.

Note: There are services out there that will allow you to test your code automatically on check in of an update to make sure all browsers support your code.

Latest version of JavaScript

The latest version of JavaScript (ES7) is supported by the updated versions of Google Chrome and Mozilla Firefox.

CSS Introduction- Definition, Advantages and Uses

1 What is CSS ?

CSS full form is Cascading Style Sheets.

Cascading Style Sheets are used in HTML to position and to display the HTML elements.

CSS can be used to manage the color, text, position, layout, transformation, animations and other properties of html elements.

In other ways

The design language, Cascading Style Sheets, popularly known by its acronym CSS is primarily employed to make the process of creating presentable web pages much more simple and programmer friendly.

Controlling the text color, font style, paragraph spacing and sizing of the columns are included among the key features of CSS along with many more design effects.

Combined with mark-up languages like HTML and XHTML, CSS provides a strong control over the design and presentation of the web pages.

2 The Advantages of CSS

Here are a few advantages of CSS that will help you understand why you should learn more about this design language:

Reusable Code – CSS codes are reusable. This means, once written, they can be used in multiple HTML pages with similar requirement for the HTML elements.

Similarly, any global change can for the HTML elements can be made by simply making the change once in the CSS code.

Faster Processing – Since the attributes per HTML tag are less due to the CSS code, the web pages are loaded faster.

Better Styling Options – Having a range of attributes larger than HTML, CSS enables you to have more styling options with less hassle.

Cross-Platform Functioning – The CSS style sheets enable the web-pages to withhold their design across various platforms and devices

Web-Page Caching – CSS has the feature of caching the web applications locally enabling them to be used offline on the browser.

The latest CSS version being used is CSS3.

3 Uses of CSS

  • CSS is used to display html elements on specific position.
  • CSS is used to manage look and feel of HTML elements
  • CSS is used in webpages design.
  • To make device compatible web pages.
  • Add animation and effect in HTML elements

CSS can used externally, internally and inline.

4 Modules of CSS

Following are some of the modules that are present in it:
Text Effects
2D Transformation and 3D Transformations
Image Values
Multiple Columns

CSS can potentially control the whole layout of an HTML web-page enabling the programmer to design the web pages with better styling and less fuss.

In the subsequent css tutorial, we will learn about the syntaxes and constructs that are required to develop and execute CSS style sheets.

JavaScript Introduction

JavaScript is a client side scripting language. Javascript code is downloaded from server and executed on clients browser.

We can include javascript statements in html file or we can create a javascript file and can import it on html files.

In html file we can use script tag to write javascript statements.


we can write script tag inside head or inside body section.



We can also put script tag inside body generally we include as last statement of body


Here document refers to body of browser and write() is a function used to write the content on browser body.

We can create a separate javascript file and can include that file in html
We have a javascript file names myJavaScript.js

Same folder having file first.html

Here we are including an external javascript file in html file the src attribute must contain path of javascript file.