Chapter 5: Importing JavaScript Code

A Complete Frontend Developer Textbook for Beginners (2023 Edition)

Thon Ly
Silicon Wat University

--

This is the textbook version of Lesson 5 of 100 from the Udemy video course: A Complete Frontend Developer Course for Beginners

Chapter 4: Importing CSS Code

Table of Contents

Overview

This lesson covers the following HTML tags, CSS properties, and JavaScript topics for the first time:

HTML

  1. script
  2. src (attribute)

CSS

None.

JS

  1. event handler
  2. onload

This lesson begins with a fresh Codepen. Open a new one and code along with me to increase retention!

Lecture

Just like there are three ways to include CSS code in our HTML document, there are also three ways to include JavaScript code which we cover in this lesson.

External JS

Similar to CSS, the first method is also called external.

Method 1: External JS

--

--