Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

HTML Lists.md 1.5 KB

You have to be logged in to leave a comment. Sign In

HTML Lists

Introduction

Lists are a great way to organize information. There are three types of lists in HTML:

  • Ordered lists
  • Unordered lists
  • Definition lists

Ordered Lists

An ordered list is a list of items where the order is important. In an ordered list, each item is numbered. We use the <ol> tag to create an ordered list. Each item in the list is placed between an opening <li> tag and a closing </li> tag. The following is an example of an ordered list:

<ol>
  <li>Learn HTML</li>
  <li>Learn CSS</li>
  <li>Learn JavaScript</li>
</ol>

Unordered Lists

An unordered list is a list of items where the order is not important. In an unordered list, each item is marked with a bullet point. We use the <ul> tag to create an unordered list. Each item in the list is placed between an opening <li> tag and a closing </li> tag. The following is an example of an unordered list:

<ul>
  <li>Learn HTML</li>
  <li>Learn CSS</li>
  <li>Learn JavaScript</li>
</ul>

Definition Lists

A definition list is a list of terms, with the definition for each of those terms. We use the <dl> tag to create a definition list. Each term is placed between an opening <dt> tag and a closing </dt> tag. The definition is placed between an opening <dd> tag and a closing </dd> tag. The following is an example of a definition list:

<dl>
  <dt>HTML</dt>
  <dd>Hypertext Markup Language</dd>
  <dt>CSS</dt>
  <dd>Cascading Style Sheets</dd>
  <dt>JS</dt>
  <dd>JavaScript</dd>
</dl>
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...