Library   Directories   Contact Us Search:   

Suffolk University | LAW SCHOOL
About Suffolk Law

Academic Programs

Admissions

Faculty

Offices & Services

» Home » Offices » Technology Services » Web Services » HTML 101

OFFICES & SERVICES

H T M L   1 0 1 - NESTED LISTS

Ordered Lists and Unordered lists can have different levels; each will be indented appropriately by your web browser. Your major concern will be to verify that each list is properly terminated and the nesting order is correct.

It can start to look complicated with all of those <ol> <li> </ul> <li> tags floating around, but just try to remember the basic structure:

      <ul>            <ol>
          <li>           <li>
          <li>           <li>
      </ul>           </ol>
              

Here is an example of an unordered list with sublevels of other lists:

Nested Unordered List
  • This is the first item
  • This is the second item
    • This is the first subitem of the second item
      • And this is a subitem of a subitem
      • Getting lost yet?
    • This is the second subitem of the second item
    • This is the third subitem of the second item
  • This is the third item

Note how the bullet marks change for different levels of the list.

And this is the HTML format for producing this format:

  <B>Nested Unordered List</B>
  <ul>
     <li>This is the first item</li>
     <li>This is the second item</li>
     <ul>
       <li> This is the first subitem of the second item</li>
       <ul>
         <li> And this is a subitem of a subitem</li>
         <li> Getting lost yet?</li>
       </ul>
       <li> This is the second subitem of the second item</li>
       <li> This is the third subitem of the second item</li>
       </ul>
     <li>This is the third item</li>
  </ul>
              

Nested Lists -- Mixing them together

Not only can you include ordered lists within ordered lists, but you can also mix and match list types. Hold onto your hats! The HTML starts to look pretty ugly, but watch how lists completely contain other lists.

For example, this ordered list includes a nested unordered list:

Nested Unordered List Nested Unordered List
  1. This is the first item
  2. This is the second item
    • This is the first subitem of the second item
      1. An this is a numbered subitem of a subitem
      2. An this is another numbered subitem of a subitem
      3. Getting lost yet?
    • This is the second subitem of the second item
    • This is the third subitem of the second item
  3. This is the third item

And this is the HTML format for producing this format. Note how the HTML has been indented to make it easier to read:

<B>Nested Unordered List</B>
     <ol>
        <li>This is the first item
        <li>This is the second item
           <ul>
           <li> This is the first subitem of the second item
              <ol>
              <li> And this is a numbered subitem of a subitem
              <li> And this is another numbered subitem of a subitem
              <li> Getting lost yet?
              </ol>
           <li> This is the second subitem of the second item
           <li> This is the third subitem of the second item
           </ul>
        <li>This is the third item
     </ol>


« previous   home   next »

 

Academic Resources
Technology Services
 -  Email
 -  Computer Services
 -  Media Services
 -  Web Services
  --  Styleguide
  --  Policies
  --  Links
  --  Support
  --  HTML 101
  ---  What is a Web Browser
  ---  Available Browsers
  ---  Writing HTML
  ---  HTML Tags
  ---  HTML Page Creation
  ---  Walkthroughs
  ---  Tag Examples
  ---  Lists
  ---  Nested Lists
  ---  Definition Lists
  ---  Graphics
  ---  Inline Graphics
  ---  Web Readability
  ---  URLs
  ---  Hyperlinks
  ---  Tables
  ---  Advanced Tables
  ---  Table Attributes
  ---  Bibliography
  --  Contact Us
  --  Blackboard
  --  Campus Cruiser
 -  Teaching with Technology
 -  About Us
Admissions
Advanced Legal Studies
Rappaport Center for Law and Public Service
Alumni Relations
Career Development
Dean of Students
Financial Aid
Law Bookstore
Offices of Communications
Registrar


HOME | ABOUT SUFFOLK | ACADEMIC PROGRAMS | ADMISSIONS | FACULTY | OFFICES & SERVICES
Suffolk University | Campus Calendar | Campus Cruiser Portal | Blackboard | Law Library | Directories
Site Map | Login | Email | Contact Us


Copyright © Suffolk University Law School, 2003-2007. Disclaimer |120 Tremont Street | Boston | MA | 02108-4977