HTML and CSS Reference
In-Depth Information
After the previous section, you should have noticed that
window
is an
object and
alert
is a method. This is built-in functionality provided by
the browser.
JavaScript linked in a file
In the same way that
CSS
can be kept in a separate file so it can be used
in more than one web page, so can JavaScript. When you load the
page in your browser, it looks much the same as the previous example.
For this you need two files. The first is an
HTML
page:
<!DOCTYPE html>
<html>
<head>
<title>Linked script</title>
</head>