How can you apply CSS styles to a web page?

This common interview question for the freshers. The following are the three styles to a web page.

Inline CSS


If you want to apply CSS on a single line, then it is required as follows.


<p style="color:red">myblogspot</p> 

Internal CSS

If you want to apply CSS on a single page, then it is required as follows.


<style>  
p{color:red}  
</style>

External CSS 

If you want to apply CSS on a multiple pages, then it is required as follows.

p{color:red} 

No comments:

Post a Comment

What is Normalization?

Database normalization is a data design and organization process applied to data structures based on rules that help building relational dat...