Easy CSS Tutorial For Beginners

Rate: 10 Average 10 | Votes : 1 person. | Count: 10.

 

 

Css is used to style web page elements.You can use CSS for any color and any sized object on web page. There is three different naming style in CSS file.

 

 

For example:

You have a image on web page.

girl-and-butterfly.jpg

The HTML tag for this image is:

html-tag.gif

You just need to write this code in your CSS file:

----------
img{ width:100px; height:50px}
----------

This technique called as "TAG NAME STYLING", there is no (#) or (.) in front of img tag name.

When you do so, every image dimensions on your page will changes to 100x50 pixels.

 


 

Every single object on web page can its own ID name. But this Id must be unique name.

for example:

div-cc.gif

Then you need to use (#) for shape this div in front of this CSS file.

#logo{ width:300px; height:50px}

 

 


 

The last one is used for styling one ore more objects. Create one CSS style and use it when you needed.

for example: There is H2 tag on your page. Which means header , but there can be more than one header. You can use (.) name. when do this kind css rule.


headers.gif

Now we want to change this two Hader2 at same time.

write this in your CSS file:

.my_lovely_header{ font-size:10px}

 

You need to change HTML with this rule:

last.gif

You should use php to write web pages.

Comments (0) 2013-01-14 13:42:31, Good: 0 , Bad: 0

      New Questions