<script>
tag. The <script>
tag can be positioned inside either the <head>
or <body>
section based on the specific requirements.<head>
section of the HTML file where this code is intended to be utilized.
<script>
// JavaScript Code
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
Basic Example to Describe JavaScript
</title>
</head>
<body>
<!-- JavaScript code can be embedded inside
head section or body section -->
<script>
console.log("Welcome to GeeksforGeeks");
</script>
</body>
</html>
![]() |
Download the notes
What is JavaScript?
|
Download as PDF |
51 videos|30 docs|12 tests
|
1. What is the history of JavaScript? | ![]() |
2. What is JavaScript used for in software development? | ![]() |
3. What are some key characteristics of JavaScript that make it a lightweight language? | ![]() |
4. What are some common frequently asked questions about JavaScript? | ![]() |
5. How does JavaScript differ from other programming languages in terms of versatility? | ![]() |