DIR Return Create A Forum - Home
---------------------------------------------------------
The New DS computer forum!!
HTML https://dscomp.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Web site Programing
*****************************************************
#Post#: 576--------------------------------------------------
CSS or cascading style sheet [Intro]
By: Admin Date: August 22, 2011, 7:48 pm
---------------------------------------------------------
[center]CSS [Intro][/center]
CSS goes with HTML, CSS is what makes web pages have their color
and pictures and controls the images location as well as how
text looks and acts.
CSS can make or break a web pages look as well as functionality.
CSS is much easier and more organized than HTML formatting;
which can also be used in moderation with CSS but be careful not
to over lap.
Now there are two ways to impliment CSS,
One of which is by writing it straight into the HTML document
inline with your traditional or formatted HTML code.
This way although convinent for writing short small quick web
pages is not an ideal way of writing a full featured and rich
web site. That is where the second method comes into play, this
method is much more organized and easier to make changes to;
That method involves two files depending on how many separate
pages you want then you may need more.
This method is the best for multi page rich web sites. The
reason is that you can have one separate CSS file and then have
several HTML files for different pages but each HTML page
can/will work off of the single CSS file. This method is the
best for multi-page site because if you make a CSS code mistake
then you won't have to go into each HTML file and find, change
and save each file and upload back to your server. It saves time
and resources.
Ok so now that we got that whole slew of information out of the
way I am going to start out with a single example of code, on
will be HTML and the other will be a corresponding CSS line.
example 1.
HTML:
[code]<html>
<title>Test CSS</title>
<body>This is a test of my CSS coding skills</body>
<head>
<link rel="stylesheet" type="text/css" href="test.css" />
</head></html>[/code]
CSS
[code]body {color:blue;}[/code]
Now to try this for your self then copy and paste the HTML into
a text file save it as an HTML file {any name} then create a new
file named test.css the file name is important as it is what
will enable the first HTML file to draw off of the CSS file. I
have already made it so the code will work. You can add more
properties and add on to what is already here but I will talk
more about how to do that in the next topic.
For an example it should roughly look like this:
HTML http://www.dscompforums.tk/index.php?action=ezportal;sa=page;p=11
Next topic: CSS and HTML Level 1
*****************************************************