Monday 25 March 2013

Learn CSS with Webtey(Part-II)


 The id Selector


We use then id selector inside he tag which we want to render it. Suppose we have a tag say <p>
And,
In that tag we will add the is selector say,

<p id="change">

In the css we will write,


#change {
 text-align:center;
color:red; 


 The class Selector

Using class is very simple ...It is same as that like th id selector the only difference is that in the css code you have to place a dot (.) in place of hash(#).
And, 
In place of id we have to write class.
<p class="change">

The css:-


.change {
 text-align:center;
color:red; 

Webtey VJ

No comments:

Post a Comment