THERE ARE THREE TYPES OF LISTS IN HTML

+3 Soyuj Basnet · November 3, 2014
THE THREE TYPES OF LISTS ARE :-
1)ORDERED LIST
2)UNORDERED LIST 
3)DESCRIPTION LIST

3)DESCRIPTION LIST:-
<dl>
<dt>Your Title<dt><!--dt="Description Title"-->
<dd>Anything <dd><!-- dd="Description Data"-->
</dl>

Post a Reply

Replies

Oldest  Newest  Rating
0 Predrag Kostic · November 15, 2014
So says W3Schools: http://www.w3schools.com/html/html_lists.asp
The 'dd' tag gets indented, that's all wow.
0 timi peniel · December 13, 2014
i don't know if this description list as a list-style type, bcos when i tried it, it didn't come with a default style. it looks like text that were braked by a <br /> and i tried to style it with a style type in CSS but it didn't worked. Would explain better??
The questions are, "does it come with it default style list?"  and if not "can it be styled to have a list-style-type?"..
+1 Doug Fresh · December 14, 2014
Description Lists or Definition Lists (HTML4) are used for continuity and accessibility. While it is true that it basically is a <h5> element combined with a <p> element, a screen reader program will read each item in a <dl> as if it were a list. It's part of good practice standards. The <dl> element is also extremely beneficial when styling the print page for websites. 

<dl> default css:

dl {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
}
  • 1

HTML / CSS / Web Design

106,990 followers
About

Discuss, share, ask, learn and teach HTML5 and CSS3.

Links
Moderators