Essential HTML Terms & Examples

Familiarize yourself with key HTML terms used in this page. Expand each term below for a detailed explanation and sample code.

<ul> (Unordered List)

An unordered list is used to group a set of related items without implying a particular order. Each item in the list is marked up with the <li> (list item) element.

Example:

<ul>
        <li>Item One</li>
        <li>Item Two</li>
        <li>Item Three</li>
      </ul>
      
<ol> (Ordered List)

An ordered list is similar to an unordered list except that the list items are automatically numbered. This is useful when the sequence or ranking of the items matters.

Example:

<ol>
        <li>First Step</li>
        <li>Second Step</li>
        <li>Third Step</li>
      </ol>
      
<li> (List Item)

The list item element <li> is used inside both ordered and unordered lists to denote each individual item.

Example:

<li>This is a list item</li>
      
<a> (Anchor / Hyperlink)

The anchor element <a> is used to create hyperlinks, allowing users to navigate to another page or a different section within a page.

Example:

<a href="https://example.com">Visit Example.com</a>
      
<nav> (Navigation Section)

The <nav> element defines a section containing navigation links. This helps separate navigational blocks from other content, enhancing accessibility and search engine optimization.

Example:

<nav>
        <ul>
          <li><a href="home.html">Home</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
      </nav>
      

Different Types of HTML Lists

Explore the various types of lists you can create with HTML. Use the tabs below to learn about Unordered Lists, Ordered Lists, and Definition Lists.

Unordered List

An unordered list is used when the order of the items does not matter. Each element is marked up with the <li> tag and the container is wrapped in a <ul> element.

<ul>
        <li>Apple</li>
        <li>Banana</li>
        <li>Cherry</li>
      </ul>

Ordered List

An ordered list automatically numbers each list item. Use the <ol> element to wrap your list items when the sequence is significant.

<ol>
        <li>Wake Up</li>
        <li>Brush Teeth</li>
        <li>Have Breakfast</li>
      </ol>

Definition List

A definition list groups terms and their descriptions. It uses the <dl> element along with <dt> for the term and <dd> for the definition.

<dl>
        <dt>HTML</dt>
        <dd>HyperText Markup Language</dd>
        <dt>CSS</dt>
        <dd>Cascading Style Sheets</dd>
      </dl>