CSS designing introduction


Three ways of writing CSS

There are three ways by which we can apply the CSS effect on HTML tag. 1. By Class. 2. By ID (unique identifier). 3. By Tag name. We will execute the full code in next tutorial. Now let's discuss briefly.

1. By Class

Class will start with the dot ( . ) symbol. For example <style> .myclass{ font-size: 10px; color: red; } </style>

2. By ID (unique identifier)

ID will start with the hash ( # ) symbol. For example <style> #mydiv{ font-size: 10px; color: red; } </style>

3. By Tag name.

We can also use the tag names ,we can use any html tag . For example <style> p{ font-size: 10px; color: red; } div{ height: 100px; width: 200px; } </style> In the next chapters we are going to discuss the detail example of CSS effects one by one
Chapter Next »