{"id":61,"date":"2022-03-19T09:58:18","date_gmt":"2022-03-19T09:58:18","guid":{"rendered":"https:\/\/staging.brightwhiz.com\/?post_type=topic&p=61"},"modified":"2022-03-19T09:58:19","modified_gmt":"2022-03-19T09:58:19","slug":"html-lists","status":"publish","type":"topic","link":"http:\/\/local.tutorials\/topic\/html-lists\/","title":{"rendered":"HTML – Lists"},"content":{"rendered":"\n
With HTML lists, web developers can group a set of related items into lists. In HTML there are three types of lists as specified via the following elements:<\/p>\n\n\n\n
<ul><\/code> \u2212 An unordered list. This list will display items using plain bullets.<\/li><ol><\/code> \u2212 An ordered list. This list will use various schemes of numbers to list the items.<\/li><dl><\/code> \u2212 A definition list. This list arranges your items in the same way as they are arranged in a dictionary.<\/li><\/ul>\n\n\n\nHTML Unordered Lists<\/h2>\n\n\n\n
An unordered list is contained with the <ul><\/code> tag. Each list item starts with the <li><\/code> tag. By default, the list items will be marked with small black circle bullets (disc type attribute).<\/p>\n\n\n\n<ul>\n <li>Python<\/li>\n <li>HTML<\/li>\n <li>CSS<\/li>\n <li>JavaScript<\/li>\n<\/ul><\/code><\/pre>\n\n\n\nThis is what an HTML unordered list looks like:<\/p>\n\n\n\n
- Python<\/li>
- HTML<\/li>
- CSS<\/li>
- JavaScript<\/li><\/ul>\n\n\n\n
You can use the type attribute for the <ul><\/code> tag to specify the type of bullet you like. The default is disc. These are the possible options:<\/p>\n\n\n\n<ul type="square">\n<ul type="disc">\n<ul type="circle"><\/code><\/pre>\n\n\n\nHTML Ordered List<\/h2>\n\n\n\n
An ordered list is contained with the <ol><\/code> tag. Each list item starts with the <li><\/code> tag. The list items are displayed with numbers by default:<\/p>\n\n\n\n<ol>\n <li>Breakfast<\/li>\n <li>Lunch<\/li>\n <li>Dinenr<\/li>\n<\/ol><\/code><\/pre>\n\n\n\nThis is what an HTML ordered list looks like:<\/p>\n\n\n\n
- Breakfast<\/li>
- Lunch<\/li>
- Dinner<\/li><\/ol>\n\n\n\n
The type Attribute<\/h2>\n\n\n\n
You can use the type attribute for the <ol><\/code> tag to specify the type of numbering you like. These are the possible options:<\/p>\n\n\n\n<ol type="1"><\/code> – Default-Case Numerals.
<ol type="I"><\/code> – Upper-Case Numerals.
<ol type="I"><\/code> – Lower-Case Numerals.
<ol type="A"><\/code> – Upper-Case Letters.
<ol type="a"><\/code> – Lower-Case Letters.<\/p>\n\n\n\nThe start Attribute<\/h2>\n\n\n\n
You can use the start<\/code> attribute for the <ol><\/code> tag to specify the initial numbering index you need.<\/p>\n\n\n\n<ol type="1" start="6"><\/code> – Numerals starts with 6.
<ol type="I" start="6"><\/code> – Numerals starts with VI.
<ol type="i" start="6"><\/code> – Numerals starts with vi.
<ol type="a" start="6"><\/code> – Letters starts with f.
<ol type="A" start="6"><\/code> – Letters starts with F.<\/p>\n\n\n\nHTML Definition Lists<\/h2>\n\n\n\n
HTML definition lists can be used to create name\/value pair lists such as those you would find in a dictionary of terms and definitions, a glossary, etc.<\/p>\n\n\n\n
Definition lists achieve this using the following three tags.<\/p>\n\n\n\n
<dl><\/code> \u2212 Defines the start of the definition list
<dt><\/code> \u2212 A term within the definition list
<dd><\/code> \u2212 The term definition<\/p>\n\n\n\n<dl>\n <dt><b>HTML<\/b><\/dt>\n <dd>This stands for Hyper Text Markup Language<\/dd>\n <dt><b>CSS<\/b><\/dt>\n <dd>This stands for Cascadig Style Sheets<\/dd>\n<\/dl><\/code><\/pre>\n\n\n\nThis is what an HTML definition list looks like:<\/p>\n\n\n\n
- HTML<\/strong>
This stands for Hyper Text Markup Language <\/li>- CSS<\/strong>
This stands for Cascading Style Sheets<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"With HTML lists, web developers can group a set of related items into lists. In HTML there are three types of lists as specified via the following elements: <ul> \u2212 An unordered list. This list will display items using plain bullets. <ol> \u2212 An ordered list. This list will use various schemes of numbers to […]<\/p>\n","protected":false},"featured_media":43,"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[2],"tags":[],"subject":[7,8],"yoast_head":"\n
Learn HTML - Lists<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\t\n