Good Morning Sir,
I am having a problem on using a classes in CSS I have so far searched in the internet but I could not find the answer so I am asking here,
I have a class in my external CSS file like this
.class
{
h1
{
color:green;
}
}
I have correctly linked the CSS to my HTML5 file using a link tag
<link href="Venture.css" type="text/css" rel="stylesheet">
But when I use the heading (h1) tags the font has no color (green)
What I have tried:
I searched in the internet. I am self-learning this so I don't know what am I missing.
I have searched about 20 web pages none of them gave me this answer,
To make my-self clear, can we create many classes in one external css file and in each class can we create styles for different tags?
.class
{
h1
{
color:green;
}
}
.class1
{
h1
{
color:blue;
}
}
If I use class then green color heading will be displayed if I use class1 blue color heading should be displayed how can I do that?
Kindly help me with this sir!
Thank you for your time sir!