/    Sign up×
Community /Pin to ProfileBookmark

Path in offline html pages

just to clarify: what is right way to specify references to the CSS & JS files in offline html pages? (Intranet pages). All files, html, .CSS and .JS located within one folder.
Is this right way, just specify file name?
<link rel=”stylesheet” href=”rocket.css” type=”text/css” />

<script src=”AC_RunActiveContent.js” language=”javascript”></script>

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@tracknutJul 13.2009 — Assuming (x)HTML here, I'd think your second one would be:

<script src="AC_RunActiveContent.js" type="text/javascript" />

...but yes, just the file name.

Dave
Copy linkTweet thisAlerts:
@Declan1991Jul 13.2009 — Yes, for the same folder, nothing or ./rocket.css are ok. For the root directory always, use /rocket.css, and for the parent directory, ../rocket.css. They can also be chained, like ../../rocket.css is the grandparent directory.

Don't self-close a script tag. It doesn't work in IE (well I'm not sure about the latest versions, but in 6 for sure).
Copy linkTweet thisAlerts:
@TaurusauthorJul 14.2009 — does the file name should be enclosed in quotation marks?
Copy linkTweet thisAlerts:
@CharlesJul 14.2009 — [i]From the HTML 4.01 Specification[/i]

In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them.

[i] http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2 [/i][/quote]
..
×

Success!

Help @Taurus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...