How to create description list in HTML
HTML Description List
In previous tutorials you learnt about Ordered and Unordered List.
There is one more type of list in HTML i.e. description list. In this list, we have three tags <dl>(description list), <dt>(description term) and <dd>(description data) tag.
Description list starts with the <dl> tag. It defines description list.
Inside <dl> tag, <dt> tag is used which is used to define the term which we want to describe in our list. After this, <dd> tag is used to define the description or definition of the following term inside the <dl> tag.
Code snippet:
<html>
<body>
<dl>
<dt>Emoji</dt>
<dd>Emoji are ideograms and smileys used in electronic messages and web pages.</dd>
</dl>
</body>
</html>
<body>
<dl>
<dt>Emoji</dt>
<dd>Emoji are ideograms and smileys used in electronic messages and web pages.</dd>
</dl>
</body>
</html>
Output:
- Emoji
- Emoji are ideograms and smileys used in electronic messages and web pages.
For live demo, go though below Youtube video:
Comments
Post a Comment