What is JAVASCRIPT, How to add JAVASCRIPT ?

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOps School!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

JavaScript is object-oriented programming language which is used by several websites for scripting the webpages. It is an interpreted, full-fledged programming language that enables dynamic interactivity on websites when applied to an HTML document.

Features of javascript

  • All web browsers support JavaScript as they provide built-in execution environments.
  • JavaScript follows the syntax and structure of the C programming language.
  • It is a case-sensitive language.
  • JavaScript is supportable in several operating systems including, Windows, macOS, e
  • It provides good control to the users over the web browsers.

How to add Javascript?

There are two ways to add javascript in the file.

  • Inline way
  • external way

Inline way to add javascript

In this, we have two options – Head tag and Body tag or JavaScript can be added directly to the HTML file by writing the code inside the <script> tag . We can place the <script> tag  either inside <head> or the <body> tag  according to the need.

Syntax = <script type= "text/javascript"> </script>

External way to add javascript

in this also, we have two option to add our code in the file- Head tag and Body tag or The other way is to write JavaScript code in another file having a .js extension and then link the file inside the <head> or <body> tag of the HTML file in which we want to add this code.

syntax= <script src = "filename.js"  type =  "text/javascript"></script>

Related Posts

Mastering the DevOps Salary Landscape: A Comprehensive Guide

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps! We spend hours scrolling social media and waste money on things we forget, but won’t spend 30…

Read More

The Complete DevOps Certification Guide: From Beginner to Expert Architect

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps! We spend hours scrolling social media and waste money on things we forget, but won’t spend 30…

Read More

A Guide to Selecting the Right DevOps Training Format

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps! We spend hours scrolling social media and waste money on things we forget, but won’t spend 30…

Read More

DevOps Certification Training: Identifying Quality and Expertise

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps! We spend hours scrolling social media and waste money on things we forget, but won’t spend 30…

Read More

Complete DevOps Training Guide for Assessing Mentor Technical Competence

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps! We spend hours scrolling social media and waste money on things we forget, but won’t spend 30…

Read More

Mastering Your Future: The Complete Guide to the Canada PR CRS Calculator

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps! We spend hours scrolling social media and waste money on things we forget, but won’t spend 30…

Read More
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x