How to create a list in HTML using the ul, ol and dl tags
Lists are for grouping information on a specific topic, they might be needed anywhere. In HTML there are special tags for their creation, it all depends on which list need to be done.
Lists can be of different types:
- marked - created using the ul tag, each item in the list is marked with a marker;
- numbered - created using the ol tag, each item in the list is marked with a number. The following attributes are available: reversed, start, type ;
- definition list - created using the dl tag, consists of term and definition pairs.
An example of a bulleted list:
& lt; ul>
& lt; li> Item 1 & lt; / li>
& lt; li> Item 2 & lt; / li>
& lt; li> Item 3 & lt; / li>
& lt; / ul>
Example of a numbered list:
& lt; ol>
& lt; li> Item 1 & lt; / li>
& lt; li> Item 2 & lt; / li>
& lt; li> Item 3 & lt; / li>
& lt; / ol>
An example of a definition list:
& lt; dl>
& lt; dt> Term 1 & lt; / dt>
& lt; dd> Definition 1 & lt; / dd>
& lt; dt> Term 2 & lt; / dt>
& lt; dd> Definition 1 & lt; / dd>
& lt; dd> Definition 2 & lt; / dd>
& lt; dd> Definition 3 & lt; / dd>
& lt; / dl>
Thus, creating a list in HTML is quite simple, just use the tags listed above.
Comments (0)
For commenting sign in or register.
Оставить заявку
Latest articles
- 03.04.24IT / Уроки PHP Уроки простыми словами. Урок 3. Все операторы PHP с примерами, с выводом работы кода на экран.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 2. Типы данных в PHP с примерами.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 1. Коротко о языке веб-программирования PHP. Основы синтаксиса.
- 09.11.23IT / Database Errors when migrating from MySQL 5.6 to 5.7 and how to fix them - database dump import failed with an error or INSERT does not work. Disabling STRICT_TRANS_TABLES strict mode or using IGNORE
- 08.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes