#CSS Tutorial#
What is CSS CSS stands for cascading style sheet its used to style a web page. Its what we use to make websites look amazing and creative with stunning visual effects. Combine this with some photoshop design skills and you can make truly stunning looking websites like this one. The Syntax So lets have a look at what the code looks like body This will then turn the background
colour of the page red. So lets break this down to understand how it works a
bit better. #myid and for a class use a dot like this .myclass How to use it Okay so there are 3 different ways of implementing CSS code into our website;
<div style="margin: 0px;">content</div> Next we have the block method which sits in the header its used for a moderate amount of styling <html> Now lastly we have the external method which is where you make a .css file to store all the CSS data. Remember though you can combine all 3 methods if you like. Now to set up a link between the HTML file and CSS file type this in the head of your HTML <html> So here we have an external CSS file called style.css, make sure its in the same directory so it can be found from the HTML file. So now lets have a look at what is inside the CSS file called style. body {
background-color: red; and that's all there is to it, I do recommend using the same stylesheet for different web pages because otherwise you will have to change the styling for each page which is very pointless and a waste of time. |