(adsbygoogle = window.adsbygoogle || []).push({});
This tutorial will teach you how to take a CSS stylesheet you have already created, and link it to your web page, using the correct way.
Lots of people apply their CSS, "
inline" with the html code. These are called inline styles. This to me is pretty much ****ing stupid, unless your making a one page website. The whole point of CSS is to be able to not have to type so much code, and have the ease to apply that style on every page with just one line of code.
The most basic and honestly, the only way you should do this, is by linking your current page to an external stylesheet.
Lets say you already have
index.html created. You also have your CSS stylesheet that you want to apply to
index.html.
You are going to name your CSS stylesheet for index.html:
style.css. You can name it anything you want, but lets keep it simple.
Now you are going to want to go into the html of
index.html.
In the
<head></head> container, your going to want to add the following line of code:
<link rel='stylesheet" href="style.css" type="text/css" media="screen">
You can repeat that line of code above in any page on your website, if you want to apply that same style to all your pages.
Any questions, feel free to ask!
Written by supaafly of
You must login or register to view this content.