Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Incorporating JavaScript in BODY Element
WhatsApp
Aarthna Maheshwari
5y
6
k
0
1
25
Blog
Using JavaScript
You can place the SCRIPT tag in the BODY tag of the HTML document. The script inside the BODY tag executes when the web page starts loading in a web browser.
Demo
Let’s create a document called ScriptInBody.html
Syntax
The syntax for placing snippet in the BODY section is
<
BODY
>
<
SCRIPT
type
=”text/javascript”
>
Script code here.
</
SCRIPT
>
</
BODY
>
Write the script in BODY section
Execute the script by opening the file in the Web Browser. If you are using Internet Explorer click on
“Allow Blocked Content”
to allow the script to execute and you are using Mozilla Firefox then click on allow
“ActiveX Controls”
.
Thanks for reading this blog.
Incorporating JavaScript in BODY Element
People also reading
Membership not found