Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Using External Resources | Working with Advanced Elements
HTML for Beginners
course content

Kursinhalt

HTML for Beginners

HTML for Beginners

1. Understanding Basic Elements
2. Working with Semantic Elements, Multimedia Elements and Graphics
3. Working with Advanced Elements

book
Using External Resources

When you develop web pages with HTML, you often need to link to external resources. For example, we usually keep our CSS and JavaScript codes in separate files.

Adding external CSS files

Suppose your CSS codes are in an "index.css" file. You use the <link> tag to link that file to your HTML code. We place this <link> tag inside the <head> tag.

With the <link> tag, we use the rel attribute to define the relationship of the external file and the href attribute to assign the external file path.

Here is the code we use for that:

html

index.html

css

index.css

copy

Adding external Javascript files

When we want to add external Javascript files to our HTML web page, we use the <script> tag with the src attribute.

html

index.html

js

index.js

copy
Which of the following attributes are required for <link> tag?

Which of the following attributes are required for tag?

Wählen Sie einige richtige Antworten aus

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 2
We're sorry to hear that something went wrong. What happened?
some-alt