Get rid of CSS repetitive entries while building a website

Asked By 10 points N/A Posted on -
qa-featured

What do I need to do in order to avoid css repeating entries while building a web site so as to avoid time wasting and the cumbersome, repetitive routine of rewriting the same code for every web page?

 
SHARE
Answered By 0 points N/A #140027

Get rid of CSS repetitive entries while building a website

qa-featured

 

Don’t worry there is an easy solution for this. All you have to do is define CLASS in CSS in order to avoid repetitive writing of codes in all CSS pages. We can use the CLASS anywhere in the website. Call the CLASS and automatically the code appears. I will show you an example of CLASS in CSS : 
 
<html> 
<head> 
<style> 
p.center 
{ 
text-align:center; 
} 
</style> 
</head> 
 
<body> 
<h1 class="center">CARS</h1> 
<p class="center">BMW.</p>  
<p class="center">AUDI.</p>  
<p class="center">FERRARI.</p>  
<p class="center"> LAMBORGHINI.</p>  
</body> 
</html>

Related Questions