How to Include a JavaScript Code in your HTML File




Access the entire course at the Zenva Academy http://lounge.zenva.com/product/programming-for-entrepreneurs-javascript/?zva_src=youtube

This video shows how you can include JavaScript code and files in a HTML file. One way to do it is by using the script tags. Another way is to include an external file with your JavaScript code.

This video-based JavaScript tutorial series covers all the basics of JavaScript starting from total scratch. Topics such as variables, functions, objects and arrays are covered in depth considering you may have absolutely no coding experience.

As part of the course, we build a prototype of a dating app using JavaScript.

JavaScript is the entry point for building interactive websites, HTML5 mobiles apps and games, and server-side applications so it’s very much worth learning.

This course was created by ZENVA (http://zenva.com), feel free to enrol for free at the Zenva Lounge (http://lounge.zenva.com) and to subscribe to our YouTube channel. We have free and premium tutorials on HTML5, game development, web development and app development.

Original source


14 responses to “How to Include a JavaScript Code in your HTML File”

  1. After spending a couple hours trying to figure out how to "include the script" properly for a slideshow, I found this video and solved the mystery. Got my website project submitted just in the nick of time. Thank you so much!

  2. I'm a bit confused as even after triple checking the code and file locations and names I can't make the external script call work. The JavaScripts works perfectly in the browser when used inside the html file but as soon as I try to call externally it stops working. Got any ideas?

  3. ok, seen very easy, i would like to know how insert external file CSS on a HTML file, i did it and nothing happened, i assume i am doing something wrong but you clear my mind with javascript on html, thank you .

  4. I myself am in dire help im developing a website for a presentation and i want to show off but i can't embed this code.

                 var red = [0, 100, 63];
    var orange = [40, 100, 60];
    var green = [75, 100, 40];
    var blue = [196, 77, 55];
    var purple = [280, 50, 60];

    var myName = "Nick";
    letterColors = [red, orange, green, purple, blue]
    if(10 > 3) {
        bubbleShape = "circle";
    }
    else {
        bubbleShape = "square";
    }

    drawName(myName, letterColors);
    bounceBubbles()

  5. I am in need of dire help. I have a game coded and ready(it does not have the canvas generation code in it though), but I don't know how to attach it to an HTML file, so I can run it in a browser so I can play it. The game has the graphics are integrated into the code. Can you tell me how to generate a 400×400 canvas and how to make it playable using an HTML file(BTW, I kind of found your vid a bit confusing). 

Leave a Reply