Uploaded November 2021 | Updated September 2026, 1 week ago
You can write your javascript inside the script tag. Your script tag can be placed everywhere within the HTML tag but you are recommended to keep the script tag within the head tag.
The script tag may contain two important attributes. They are Language and Type.
To the opening of the script tag, you can show the language as javascript but it is not compulsory as it phased out with the development of new versions of HTML. It can be written as language="javascript".
The type attribute indicates the scripting language in use which identifies the content between the script tag.
The type attribute can be written as shown here, type="text/javascript". As the text/javascript became outdated, it had replaced with the application/javascript. So it can be written as type="application/javascript". However, the "type" attribute is optional upon the introduction of HTML5.
So in short, both the attributes (Language & Type) are optional in the new versions of HTML.
In this video, you will learn how to write your first javascript with the document.write and alert message onlick.
❀ Buy books from the affiliate links below:
▶HTML and CSS QuickStart Guide: amzn.to/3Jl6hjJ
▶Web Design with HTML, CSS, JavaScript & jQuery Set at amzn.to/3uGkG6k
▶learn JavaScript Quickly: amzn.to/3uB7Q9n
❀ Visit my blog at v815.blogspot.com
❀ Join me on Telegram: https://telegram.im/@code8home
▶️ Subscribe to this channel for more videos.
You can write your javascript inside the script tag. Your script tag can be placed everywhere within the HTML tag but you are recommended to keep the script tag within the head tag.
The script tag may contain two important attributes. They are Language and Type.
To the opening of the script tag, you can show the language as javascript but it is not compulsory as it phased out with the development of new versions of HTML. It can be written as language="javascript".
The type attribute indicates the scripting language in use which identifies the content between the script tag.
The type attribute can be written as shown here, type="text/javascript". As the text/javascript became outdated, it had replaced with the application/javascript. So it can be written as type="application/javascript". However, the "type" attribute is optional upon the introduction of HTML5.
So in short, both the attributes (Language & Type) are optional in the new versions of HTML.
In this video, you will learn how to write your first javascript with the document.write and alert message onlick.
❀ Buy books from the affiliate links below:
▶HTML and CSS QuickStart Guide: amzn.to/3Jl6hjJ
▶Web Design with HTML, CSS, JavaScript & jQuery Set at amzn.to/3uGkG6k
▶learn JavaScript Quickly: amzn.to/3uB7Q9n
❀ Visit my blog at v815.blogspot.com
❀ Join me on Telegram: https://telegram.im/@code8home
▶️ Subscribe to this channel for more videos.










