Script Tag

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 160:- Script Tag

The <script> tag in HTML is used to include JavaScript code in a web page. The JavaScript code can be either included inline within the tag or can be specified as an external file.

Here is an example of inline JavaScript code:

phpCopy code

<html>  <head>    <title>Inline JavaScript Example</title>  </head>  <body>    <script>      alert("Hello, world!");    </script>  </body> </html>

And here is an example of an external JavaScript file included using the <script> tag:

phpCopy code

<html>  <head>    <title>External JavaScript Example</title>    <script src="my-script.js"></script>  </head>  <body>    ...  </body> </html>

In this example, the my-script.js file is included in the HTML page using the src attribute of the <script> tag. The file my-script.js should be located in the same directory as the HTML file.

Including JavaScript code in an external file has several advantages, including better organization of code, improved maintainability, and the ability to reuse code across multiple web pages.

18. Understanding DOM

Comments: 2

profile
@niteshguptav63
17-Nov-2024, 01:39 PM

I am not able to access videos from second class and further. I have already completed first class

profile
@niteshguptav63
16-Nov-2024, 10:56 AM

When will I get my course?

profile
@admin79
17-Nov-2024, 01:29 PM

Now, Your query was resolved.

Frequently Asked Questions (FAQs)

How do I register on Sciaku.com?
How can I enroll in a course on Sciaku.com?
Are there free courses available on Sciaku.com?
How do I purchase a paid course on Sciaku.com?
What payment methods are accepted on Sciaku.com?
How will I access the course content after purchasing a course?
How long do I have access to a purchased course on Sciaku.com?
How do I contact the admin for assistance or support?
Can I get a refund for a course I've purchased?
How does the admin grant access to a course after payment?