Where would the CSS be when actually coding a website?


#1

So in CodeCademy, it gives you a CSS tab. But if you were actually coding your own website using an app like Eclipse or
BlueJ, how would you add CSS? I really like coding, and I'm planning on making a game like Mario, because I've finished the Javascript and JQuery Courses. Just wanna know.


#2

Well it's pretty simple actually, you'd do it in the same way, just link it to your app through the html tag and the app should be able to run along side with the CSS. You can make a .css file pretty easily by using a notepad or notepad++ document, and just saving it as .css, but otherwise it's all pretty much the same.

I hope this helps!


#3

Thanks! That helps helped me a lot!

:grinning:


#4

Sure thing! Feel free to ask any more questions, but for now I'm going to mark this as solved, and move it to a proper location.

--Edit--

Have a great day david!


#5

Yea, in the same way you can simple include a javascript (js) file. If you are using jquery, make sure to include the jquery (you can download it, or you can use google, google host many versions of the jquery library)


#6

How do you "link it to your app through the html tag and the app should be able to run along side with the CSS."?


#7

If you mean the CSS file, then assuming that you have a file called main.css and it is located in the same directory as your .html file, then you would link to it like this:

  <head>
    <link href="main.css" rel="stylesheet">
  </head>

If you want to link to a JavaScript file then you do it like this:

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

You might find that reading up on placement of your JavaScript file is helpful: