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?
Unordered lists ( UL ), ordered lists ( OL ), and list items ( LI )
The <li> tag defines a list item. The <li> tag is used inside ordered lists(<ol>), unordered lists (<ul>), and in menu lists (<menu>). In <ul> and <menu>, the list items will usually be displayed with bullet points. In <ol>, the list items will usually be displayed with numbers or letters. Tip: Use CSS to style lists.
The <ul> HTML element represents an unordered list of items, typically rendered as a bulleted list.
HTML Lists and CSS List Properties. In HTML, there are two main types of lists: unordered lists (<ul>) - the list items are marked with bullets. ordered lists (<ol>) - the list items are marked with numbers or letters.
It's from the HTML elements of the same name.
UL - Unordered List (an ordered, or numbered, list would be OL)
LI - List Item
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).
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"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With