top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the different ways and possibility to give CSS property values?

+1 vote
404 views
What are the different ways and possibility to give CSS property values?
posted Mar 17, 2015 by Balu

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

For each selector there are “properties” inside curly brackets, which simply take the form of words such as color, font-weight or background-color.

A value is given to the property following a colon (NOT an “equals” sign) and semi-colons separate the properties.

Example:

body {
    font-size: 14px;
    color: navy;
}

This will apply the given values to the font-size and color properties to the body selector.

So basically, when this is applied to an HTML document, text between the body tags (which is the content of the whole window) will be 14 pixels in size and navy in color.

answer Mar 26, 2015 by Manikandan J
...