Arthur Mamou-Mani
Arthur Mamou-Mani

Reputation: 2333

HTML and CSS: What do the <ul> and <li> tags stand for?

In the following lines of CSS code:

.sf-menu li:hover ul, .sf-menu li.sfHover ul {top: 40px!important; }

What do the HTML tags <ul> and <li> mean?

Upvotes: 9

Views: 77380

Answers (3)

tskuzzy
tskuzzy

Reputation: 36466

ul stands for unordered list.

li stands for list item.

They are the HTML tags for "bulleted" lists as opposed to "numbered" lists (which are specified by ol for ordered list).

Upvotes: 11

craig65535
craig65535

Reputation: 3582

It's from the HTML elements of the same name.

UL - Unordered List (an ordered, or numbered, list would be OL)
LI - List Item

Upvotes: 31

Guffa
Guffa

Reputation: 700372

They target <ul> and <li> elements in the page.

In CSS an id is prefixed by #, a class is prefixed by ., and an element has no prefix at all.

So the selector .sf-menu li:hover ul will apply to any <ul> element, inside an <li> element that you are currently pointing at, inside an element with class="sf-menu".

The selector .sf-menu li.sfHover ul will apply to any <ul> element, inside an <li> element with class="sfHover", inside an element with class="sf-menu".

Upvotes: 6

Related Questions