Key Points

  • To create a numbered (ordered) list, use the <ol> tags. For a bulleted (unordered) list, use the <ul> tags.

  • Within the <ol> or <ul> tags, use <li> tags for each list item. These tags are all two-sided. HTML does not require the closing </li>, but XHTML does.

  • Ordered and unordered lists can be nested. Enclose the second-level <ul> or <ol> list within a <li></li> tags inside the main list.

  • To use a different bullet character or numbering style, use the style="list-style-type: type" argument in the <ul> or <ol> opening tag.

  • To create a definition list, use the <dl></dl> tags. Within the <dl> tags, enclose each term in <dt> tags, and enclose each definition in <dd> tags.

  • You can display special characters on a Web page by using HTML character ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.