HTML and CSS Reference
This is handled through a <script> tag with an src attribute, typically in the <head> section of
You'll notice two things right away. First, in addition to the src attribute, the type attribute still
When the page is rendered in the browser, there is no indication that you're working with multiple
files. The functionality loads exactly the same, as shown in Figure 22-1.
create a single-line comment, place two forward slashes, // , at the beginning of the
code line, like this:
// This function gets the current time
You can also use the two-slash method at the end of a code line; all the text that
For multiple line comments, start your comment with a slash, followed by an asterisk,
/* , and end it with the reverse: an asterisk, followed by a slash, */ . Here's an example:
This function gets the current time
and presents it in an AM/PM format.
Although it is not necessary to put the /* and */ characters on their own line, it
does make the comment much more noticeable.