From the course: HTML: Metadata in the Head
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Connecting scripts - HTML Tutorial
From the course: HTML: Metadata in the Head
Connecting scripts
- [Instructor] Just as CSS has two ways to include its styles in your HTML document, JavaScript works the same way. You may include embedded or linked JavaScript in your document. You may also include that JavaScript in the head of the document, or it may go on the body of the document. Confusing, isn't it? Let's break it down. So first of all, let's consider linked or embedded JavaScript. This concept is the same kind of thing that we just saw with CSS, the positives and negatives are pretty similar as well. linking to a JavaScript file means that it's available and able to be included in multiple pages. While embedding it means that it's available only on one page. You could be linking to external JavaScript files that are either part of your website, or you could be linking to third party files as well. So let's just say that we want to link to jQuery inside of this document. I know, jQuery kind of old, but…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.