Difference between the directory, menu lists and the unordered list
Last Updated :
24 Aug, 2021
While creating an unordered list, we can make use of two different types of tags. These are used to generate directory lists and menu lists.
Directory Lists: The directory list is created using the HTML <dir> tag. This tag is used as a container for lists of files/folders of a directory. With the introduction of HTML 5, the <dir> tag has become deprecated and is no longer supported.
Syntax:
<dir> lists.... </dir>
Example: This example illustrates the <dir> tag in HTML.
HTML
<!DOCTYPE html>
< html >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >Dir Tag</ h2 >
< p >List of all computer science subjects:</ p >
< dir >
< li >Admin</ li >
< li >User</ li >
< li >Writer</ li >
< li >Database Manager</ li >
< li >Founder</ li >
</ dir >
</ body >
</ html >
|
Output:
Menu Lists: Menu lists work in the same manner as the directory lists. The <menu> tag is used to create a menu list. It serves as the container for menu items and displays them in the form of a list. Refer to the link to know the difference between <nav> and <menu> for better understanding.
Syntax:
<menu> lists... </menu>
Example: This example illustrates the <menu> tag in HTML
HTML
<!DOCTYPE html>
< html >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >Menu Tag</ h2 >
< p >List of all folders in the directory</ p >
< menu >
< li >Admin</ li >
< li >User</ li >
< li >Writer</ li >
< li >Database Manager</ li >
< li >Founder</ li >
</ menu >
</ body >
</ html >
|
Output:
Unordered Lists: Unordered Lists are also used to create a list of items. As the name suggests there is no particular order of the items i.e. they are unordered.
Syntax:
<ul> lists.... </ul>
Example:
HTML
<!DOCTYPE html>
< html >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >Menu Tag</ h2 >
< p >unordered list for professions</ p >
< ul >
< li >Teacher</ li >
< li >Admin</ li >
< li >User</ li >
< li >Writer</ li >
< li >Manager</ li >
< li >Founder</ li >
< li >Salesperson</ li >
</ ul >
</ body >
</ html >
|
Difference between Directory List, Menu List, and Unordered List:
Directory Lists |
Menu Lists |
Unordered list |
It has been deprecated in HTML5 i.e. the latest version of HTML |
It is supported by HTML 5. |
It is actively supported by HTML 5. |
They do not support any attributes for the styling of bullets. |
They do not support any attributes for the styling of bullets. |
Bullets in an unordered list can be styled using the list-style-type attribute |
The attributes of these lists are not supported by any of the browsers. |
The attributes of these lists are not supported by any of the browsers. |
The attributes of the unordered list are supported by all the renowned browsers available in the market. |
They are generally less preferred in search engine results. |
They are generally less preferred in search engine results. |
They are helpful in SEO (Search Engine Optimization) as they produce less noise and return better results in a search. |
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...