WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accespted The syntax in CSS Wed Oct 06, 2010 9:57 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
The syntax in CSS
Learn CSS - part 2


The syntax in CSS
Syntax in CSS created by three parts.

• Selector
• Property
• Value

In a strike can it look like this:
Code:
selector {
property: value;
}
The selector is normally the element/tag we wish to define. The property is the property we wish to change and the value got a variable value. The property and value is actually seperated with a semicolon and sorrundded by a bracket-parenthesis.

Here is a quick example were the text will be placed center.
Code:
p {
text-align: center;
}
If we wish to define more than one property, can we seperate it by a semicolon. Agian have we placed an example.
Code:
p {
text-align: center;
color: #333333;
font-family: verdana;
}
Groups
It's also possible to use more than one selector at the time, but you then have to seperate it with a comma as shown in the below example. Things like this can be used in connection with titles etc.
Code:
h1, h2, h3, h4, h5, h6 {
text-align: center;
color: #333333;
font-family: verdana;
}
Comment in stylesheet
It's also possible to leave a comment in a stylesheet, without it can be seen in a displayed HTML page. This can be done by doing following.
Code:
/* Your comment here */
Now we got some information about the syntax in CSS. In the next lesson will we work with the placement of the stylesheet.

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.

http://woops.dk

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum