Last Updated on March 31, 2018 by

For a long time, an interactive website needs to reload in order to achieve the triggered actions. This option was overcome by using SWF files which actually are among the heaviest elements to include in a web page. The need of elements that are light in weight, and therefore do not implicate delays in page loading, and that are executed on the page itself with no need to reload it has emerged. The solution was combining cascading style sheets with JavaScript codes to achieve the interactive behavior of the web page.

JavaScript history and features:

Basically, JavaScript was created for Netscape as a replacement for heavy flash realizations, which for a long time were the best option for interactivity.  JavaScript is a client-side programming language. It was created to perform real-time actions which mean that the scripts are executed when they are triggered with no need to reload the page. The scripts are run by specific built-in plugs. JavaScript ensures a respectable level of interactivity and it preserves a good performance of the website in term of loading speed and integrity.

JavaScript can be embedded to the HTML code can be:

  • Included in the HTML tags. This requires the initializing of the JavaScript code by adding the

<script> Some code</ script>

  • Imported as separate file. This require the use of the following lines

<script type=”text/javascript” src=”script.js”></script>


CSS history and features:

Cascading Style Sheet script adds the attributes of HTML language. It is absolutely built on tags properties and it can be implemented:

  • Directly within tags. In this case, it is declared as follow :

<HTML tag style = {property1; property2;}>Some content</ End tag>

  • In the HEAD tags of the HTML document, in a SCRIPT tag.


Property 1;

Property 2;


  • In separate files which are then imported. In this case, a LINK tag is used and it contains the file path; the file has to have the extension “.css”

<link rel=”stylesheet” href=”File PATH/Filename.css”>



CSS represents an optimization for HTL codes since it can reduce the number of lines and enhance the speed of the website. Also, it is critical for the ergonomics and for the best layout programming.

Combining JavaScript and CSS for better interactivity:

JavaScript and CSS allow users interacting with the interfaces. In fact, the several behaviors that users encounter when the browser is mainly created by style modifications handled by JavaScript codes. With the event handling of the last language, typing, hovering or clicking may create a particular style change. This change won’t be in real time if there is not CSS and JavaScript working properly within the page.



Ergonomics and customization can be very attractive when the appropriate combination is in place.

As examples, users can interact with the current page by inducing changes in element colors, element positions and can even play little games. Interacting with form elements enhances browsing session like calculating the number of typed characters, calculations, revealing hidden elements of a form according to user choice, etc.


There are also some tips that web developers in a freelance web designer singapore should consider in order to avoid slowing page load or bugging the browsers. Nowadays, CSS can perform some actions without the implementation of JavaScript. Still, the combination is the only option to perform some other actions. In all cases, scripting is always an enjoyable and indeed challenging part of the web design process.