HTML How to Make a Website Adding Pages to a Website Add Iconography

Shehan Dissanayake
Shehan Dissanayake
19,118 Points

list item problem!

What is the difference between

.contact-info{ }

and this

.contact-info li. phone{ }

1 Answer

Vladut Astalos
Vladut Astalos
11,244 Points

First selector would select every list item with a class of .phone inside of a parent with a class of .contact-info. Second selector most probably won't work because the syntax is incorrect, that period is not supposed to be after li but at the beginning of phone like this: '.contact-info li .phone' anyway if you write it like this will probably work just fine like the first but won't be as specific. It will select every element with a class of .phone that is children of a li element that is a children of an element with a class of .contact-info.