HTML Resources: Lists & Table Tags

Some tags only work in conjunction with one another (which this guide refers to as “compound tags”). For instance, to make a list, you need a tag to indicate where the list starts and ends (either <ol></ol> or <ul></ul>) and a tag for each list item (<li></li>). Similarly, for a table, you need a way to indicate where the table starts and ends, where the row starts and ends, and how many cells exist in each row. Please see the code samples below:

Lists

  • <ul> – unordered list (bullets)
  • <ol> – ordered list (numbers)
  • Both require <li> tags for each item.

Sample code to make ordered and un-ordered lists:

Tables

Tables need <table>, <tr> (rows), and <td> (cells). Use <th> for header cells. Sample code to make a table:

Additional Resources

W3Schools Reference:

Loading quiz...

UNC Asheville Department of Computer Science