Why?

Why this technology is relevant and what the scope.

HTML and CSS provide the structure and presentation of a website while Javascript (JS) provides the behaviour of a website. Js is one of the core technologies in the World Wide Web. It's one of the currently trending programming languages with constant update. Js is used to build powerful front-end web frameworks like react, angular and also server-side framework like nodeJs. A web developer should have js in his arsenal. But remember, always HTML and CSS first then js.

Take-Away Skills

After following this resource what you will learn.

Syllabus

Summary of what learn to get started.

The content

Details about the technology and learning materials.

Intergrating JS into an HTML

A js files or programs are integrated to an HTML file using the <script> tag. <script> tag helps to attach many files other an JS too.

<html>
<head>
	<title>Example App</title>
</head>
<body>
	<h1>Hello</h1>
<script src="main.js"></script>
</body>
</html>

Here a js file in the root of HTML page is attached to the HTML file. We can also type our js commands inisde script file like this

<script>
	.....statments....
</script>

JS script can also be attached to the head of the HTML file

Basic Syntax of JS

JS got so much updates over the past years. There are some significant changes to JS. Expecially the babel es2015 version gave JS a whole new outlook. Some features are pretty much advance that wont be discussed here.

Major Difference of JS

Other Syntax

JS follows that same syntax as C for most of the syntax like IF, while, for..loop etc. Only the difference is the variable is assigned using let and const.

There exist some major updates after es2015 like es2016, 2017 etc. They all provied much better JS but with drawback of lack of support for current JS driver emgine which will be there in future. Currently there are being traspiled to vanilla JS.

First Program on JS

Consider the below JS program attached to the above HTML file as script file.

const myHeading = document.querySelector('h1');
myHeading.textContent = 'Hello world!';

How it works!

Walla!! now when you load the HTML file it will showcase Hello World! instead of Hello using the js file.

Whats Next !!!!

<aside> 👶 Level: Beginner

</aside>

<aside> 💼 Career Path: Web Developer

</aside>

Top links

HTML Tutorial

This site lets you practice live with code as you learn.

HTML Help by The Web Design Group

This ancient site has all the canonical details about every HTML tag.

Free courses

Learn

Communities in Kerala

Mozilla Kerala

Resource Persons

Abid Aboobaker

Email / Twitter

Gopi Krishnan

Email / Twitter