How to Code JAVASCRIPT: *Where to Put JavaScript in HTML*

Pubblicato il: 26 luglio 2021
sul canale di: Coding With Kids
54
4

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


In questa pagina del sito puoi guardare il video online How to Code JAVASCRIPT: *Where to Put JavaScript in HTML* della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Coding With Kids 26 luglio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 54 volte e gli è piaciuto 4 spettatori. Buona visione!