CSS lists syntax question

I keep seeing different ways of writing ul and li lists in a css file. Can someone please tell, me based on this layout code:

<h1 class="title">

What is the difference between this:

h1.entry-title

and this:

.entry-title h1

and this:

.entry-title.h1

And in a bulleted list how you can have:

.class ul ul

I’ve never seen a layout with <ul><ul> and I don’t even think it’s legal. If it’s for a nested list inside a nested list why would you not add a class instead?

Thanks
Charles

Assuming the Html was supposed to have entry-title in there, it only matches the first one.

The second would match <div class=“entry-title”><h1> and the third would match <div class=“entry-title h1”>, or you could replace <div> with any other valid element.

ul ul is a perfectly valid construct. It means “a ul that is a descendant of a ul”, it doesn’t specify child (that would be ul > ul). Without the > there can be any number of intervening levels of elements.

Yes it was all supposed to be entry-title - my mistake.

I can understand the ul descendant explanation but these don’t make sense to me:

<div class=“entry-title”><h1>
<div class=“entry-title h1”>

Thanks

[font=calibri]In the first one, you’re using the <h1> element, which specifically means “top-level heading”. If you change that to a different element, you change the meaning of it. That <h1> is inside a <div> that has a class of “entry-title”, but the class name is completely arbitrary.

In the second one, the only element you’ve got is the <div>. It has two classes attached to it, “entry-title” and “h1”. Again, both of these are completely arbitrary. You’ve chosen a class name that is the same as a pre-defined element name, but that’s irrelevant … it has no intrinsic meaning. You could have called the class “heading” or “h6” or “Noah-and-the-Whale” and it would make absolutely no difference to the page.[/font]