InternetUnicode HTML Element Tags Draft for Information Only
Content
HTML List
HTML ListA simple list division in the HTML document can be defined by a <ul> element or a <ol> element. An unordered list is created and enclosed by open tag <ul> and end tag </ul>. An ordered list is created and enclosed by open tag <ol> and end tag <ol>. A more complex definition list division in the HTML document can also be defined by a <dl> element. A definition list is created and enclosed by open tag <dl> and end tag </dl>. Besides, there are also two deprecated elements, <dir> and <menu> to define directory listing and menu listing. An directory list is created and enclosed by open tag <dir> and end tag </dir>. An menu list is created and enclosed by open tag <menu> and end tag </menu>. List item <li> in unordered list <ul> and ordered list <ol>A nested <li> element is used to define a list item in the list. The list content is held between the open tag <li> and the optional end tag </li>. List items are rendered as bulleted items in a unordered list <ul>. And list items are rendered as numbered items in a ordered list.
Code Sample of unordered list division:
<ul>
<li> first list item </li> <li> second list item </li> <li> third list item </li> </ul>
HTML web page:
Code Sample of ordered list division:
<ol>
<li> first list item </li> <li> second list item </li> <li> third list item </li> </ol>
HTML web page:
List of term <dt> and definition <dd> in definition list <dl>A nested <dt> element is first used to define the "term" of a list
item in the list. The "term" is held between the open tag <dt> and the optional
end tag </dt>. Then a nested <dd> element is used to define the "description" of
a list item in the list. The "description" is held between the open tag <dt> and
the optional end tag </dt>.
Code Sample of list of term <dt> and definition <dd> in definition
list <dl>:
<dl>
<dt> first term </dt> <dd> first term description 1 </dd> <dt> second term </dt> <dd> second term description 1 </dd> <dd> second term description 2 </dd> <dt> third term 1 </dt> <dt> third term 2 </dt> <dd> third description </dd> </dl>
HTML web page:
List item <li> in directory list <dir> and menu list <menu>The <dir> element and <menu> element are deprecated elements
Code Sample of directory list division:
<dir>
<li> first directory item </li> <li> second directory item </li> <li> third directory item </li> </dir>
HTML web page:
Code Sample of menu list division:
<menu>
<li> first menu item </li> <li> second menu item </li> <li> third menu item </li> </menu>
HTML web page:
Nested listDifferent types of list can be nested together. The nested list is enclosed inside the corresponding list item element.
Code Sample of directory list division:
<dl>
<dt> Nested List </dt> <dd> A list inside a list </dd> <dt> Nested List Example 1 </dt> <dd> <ol> <li> first list item </li> <li> second directory item </li> <li> third directory item </li> </ol> </dd> <dt> Nested List Example 2 </dt> <dd> <ul> <li> first level list item 1 <ol> <li> second level list item 1 </li> <li> second level list item 2 </li> <li> second level list item 3 </li> </ol> </li> <li> first level list item 2 </li> <li> first level list item 3 </li> </ul> </dd> </dl>
HTML web page:
©sideway ID: 110300029 Last Updated: 3/14/2011 Revision: 0 Ref: References
Latest Updated Links
|
Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Reference 79 Computer Hardware 249 Software Application 213 Digitization 32 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 429 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019