You can create or edit a CSS file by saving a .txt document as .css.
You can type or edit CSS in your favourite word editor. There are many free text editors on the www that will help to achieve this task
A CSS editor can be a notepad, wordpad or any other simple text editor, professional designers use advanced code editors made just for web programming.
Once the changes are made to the CSS file, simply press save.
Make sure when making/editing a CSS file to use a pure text editor and that the file contains NO HTML coding tags. See:
CSS Tutorials might help you.
w3schools has a great CSS guide, for beginners and for the advanced.
CSS changes the properties of elements in a Web page, so to create CSS code you must decide which property needs to be changed.
Example. 1
This example shows how to set properties to the BODY element of the web page!
body {
color: #000000; /*This sets all text to Black*/
background-color: #FFFFFF; /*This sets the bacground to white*/
margin: 0; /*This sets the margin to zero*/
}
Example. 2
This example shows how to set properties to the header 1(h1 tag) of the web page!
h1 {
color: #FF0000; /*This sets the color to Red */
font-size: 16pt; /*This sets the size to16pt */
}
Example. 3
This example shows how to set properties to a link!
a:link {
color: #0000FF; /*This sets the color to Blue */
font-size: 12pt; /*This sets the size to12pt */
font-family: Arial, Verdana, serif; /*This sets the font to Arial*/
}
Example. 4
This example shows how to set the properties to when a link is rolled over by the mouse!
a:hover {
color: #00FF00; /*This sets the color to Green*/
font-size: 11pt; /*This sets the size to11pt */
}
Nearly all the properties of elements in a web page can be set as in the examples above.
BODY
H1
H2
P
DIV
A
IMG
TABLE
FORM
CSS is a language that is used to "decorate", if you will, HTML, XML, and other types of markup languages. Alone, CSS cannot "create" anything, but rather, modifies existing objects created with HTML and XML (and such). (To see where CSS markup should go, see the very bottom of this answer)
All CSS follows a pattern. object.classname {attribute:value; attribute:value;} object {attribute:value;}
tags).
If you do not specify a class, and just indicate an object, every object of the indicated type in the document will have the attributes you specify.
CSS needs to be written in