hello.
I just started learning html, xhtml and css 2 months ago. I am learning with the head first html, xhtml and css book and so far everything is fine, yet I don't get certain things concerning css. so I created a css file in my notepad in order to link to it in my xhtml files. now they try to teach me classes. here is an example:
<h2>Green Tea Cooler</h2>
<p class="greentea">
<img src="../images/green.jpg" alt="Green Tea Cooler" />
Chock full of vitamins and minerals, this elixir
combines the healthful benefits of green tea with
a twist of chamomile blossoms and ginger root.
</p>
so now I was supposed to make the paragraph green so I wrote this in my css-notepad:
p.greentea { color: green; }
so far so good. but now the book tells me that I can do the same with blockquotes. so they say I should do this:
blockquote.greentea, p.greentea { color: green; }
now my question: aren't blockquotes requiring block elements in them? wouldn't it be redundant to to write the same for p, since it should be part of the blockquote, for they are of the same class? or is my question redundant? for I have really just started and I might be a little impatient and afraid of not getting all of it.
how does the class-thing actually work, I mean I just make up the classes, right? so when do I know which element belongs to which class and how do I identify that? thank you for reading and responding.
Julietta.