From the course: HTML: Metadata in the Head
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
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 as long as jQuery is part of Bootstrap, it's totally still a thing. So…
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.
Contents
-
-
-
-
-
(Locked)
Adding a title to your page1m 40s
-
(Locked)
Creating identity for your pages with icons6m 42s
-
(Locked)
Linking styles to your page2m 39s
-
(Locked)
Specifying style directly2m 41s
-
(Locked)
Connecting scripts5m 19s
-
(Locked)
Establishing a base URL3m 31s
-
(Locked)
Challenge: Establishing scripts, styles, and icons2m 28s
-
(Locked)
Solution: Establishing scripts, styles, and icons3m 29s
-
(Locked)
-