/    Sign up×
Community /Pin to ProfileBookmark

a quick question

when linking java script and CSS from another file where do you put the link command in the HTML document?? it seems like my HTML page is not reading my CSS.

here is my command:

<link href=”scripts/sheet.css” rel=”stylesheet” type=”text/css”>
<script language=”JavaScript” src=”scripts/java.js”></script>

mike

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@CharlesSep 19.2003 — [font=georgia]The [url=http://www.w3.org/TR/html4/struct/links.html#edef-LINK]LINK[/url] element goes only in the HEAD. The SCRIPT element can go in either the HEAD or the BODY element. It is traditional to put as much of the script as one can in the document's HEAD, but any "document.write()" statements will have to go in the BODY.[/font]
Copy linkTweet thisAlerts:
@David_HarrisonSep 19.2003 — I always put my document.write()'s in a function and then I just call the function in the body, it's a lot cleaner.

I also avoid referencing external scripts in the body, it just doesn't seem right some how.
Copy linkTweet thisAlerts:
@ukemikeauthorSep 19.2003 — Why dont this .css work for me??

a:active, a:link {font-family: arial; font-size: 10px;}

a:hover {color: black; font-family: arial; font-size: 10px;}

a:visited {text-decoration: none; color: black;}

.line_width {width: 50%;}

img {border: 0;}


i have the linkage in my <HEAD> section

mike
Copy linkTweet thisAlerts:
@ukemikeauthorSep 19.2003 — is it because the link is in a div tag on the page that i linked that css to??
Copy linkTweet thisAlerts:
@David_HarrisonSep 19.2003 — That CSS should apply styling to all a tags on a page. Do you have a link to the page that shows the CSS not working?
×

Success!

Help @ukemike 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 5.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...