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?
Â
Get rid of CSS repetitive entries while building a website
Â
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>