Let's get started! 🔥🔥🔥 In this video, we will show you how to add JavaScript code to HTML 🔗 with and without creating a JavaScript function, and discuss where we can put JavaScript ⚡ in a webpage 🌐. You will learn some web development basics in less than 5 minutes!
In this video, you will learn how to:
★ 0:48 Inline JavaScript in the body section of HTML
★ 1:43 Inline JavaScript function in the head section of HTML
★ 2:30 Inline JavaScript function in the body section of HTML
★ 3:04 JavaScript code in an external .js file
Tips and Tricks:
► JavaScript code can be written between script tags.
► A JavaScript function is a block of JavaScript code that can be called when an event occurs, such as clicking a button.
► JavaScript can be placed in the body, or in the head, or in both.
► JavaScript can also be placed in external files with the .js file extension.
► Placing JavaScript in external files have several benefits:
1. Separate of concern - Presentation stays in HTML and logic (code) stays in JavaScript.
2. Easier to read and maintain - HTML tags in .html file and JavaScript in .js file.
🌐 WATCH MORE WEB DEVELOPMENT TUTORIALS
• 🌐 Web Development for Beginners
For the setup, please read the followings before you begin:
1. Download and install latest Visual Studio Code: https://code.visualstudio.com/Download
2. Install the Open in Browser extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for "open in browser", published by TechER.
HTML - Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser.
CSS - Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in HTML.
JavaScript - JavaScript (JS) is a programming language that enables interactive web pages and is an essential part of web applications.
👇 SUBSCRIBE TO CODING WITH KIDS 👨🏻💻👩🏻💻 YOUTUBE CHANNEL NOW 👇
https://youtube.com/CodingWithKids?su...
#CodingWithKids #JavaScript #WebDevelopment
On this page of the site you can watch the video online How to Code JAVASCRIPT: *Where to Put JavaScript in HTML* with a duration of hours minute second in good quality, which was uploaded by the user Coding With Kids 26 July 2021, share the link with friends and acquaintances, this video has already been watched 54 times on youtube and it was liked by 4 viewers. Enjoy your viewing!