» - HTML"> » - HTML">

Skip to content HTML / Lists Bring Order To Web Pages: Here’s The HTML Code To Create Them / <ul> HTML Tag / <ul type="">Deprecated in HTML5. Do not use.Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn moreAttribute of<ul> HTML TagWhat does <ul type=""> do?Was used to set list types.

Code Example

<ul type="circle"> <li>This is a list item.</li> <li>The items in this list don't need to be in order.</li> <li>This is an unordered list.</li> </ul>
  • This is a list item.
  • The items in this list don't need to be in order.
  • This is an unordered list.

Styling List Markers

The type attribute is used to tell the browser which type of list marker to apply to a list. The accepted values include disc, circle, and square. The default value applied by the browser is circle, so when no value is provided, that is the value used. List markers can also be controlled with CSS, and that is the proper way to style list markers now that the type property has been deprecated. The list-style-type CSS property will accept many different values. The values appropriate for an unordered list include the same values that were previously used with the type attribute. There are many additional values that are appropriate for use with ordered lists.

<style> .disc { list-style-type: disc; } .circle { list-style-type: circle; } .square { list-style-type: square; } </style> <ul class="disc"> <li>This is a list with disc list markers.</li> <li>The items in this list don't need to be in order.</li> <li>This is an unordered list.</li> </ul> <ul class="circle"> <li>This is a list with circle list markers.</li> <li>The items in this list don't need to be in order.</li> <li>This is an unordered list.</li> </ul> <ul class="square"> <li>This is a list with square list markers.</li> <li>The items in this list don't need to be in order.</li> <li>This is an unordered list.</li> </ul>

Let’s see how the browser handles each case.

Adam WoodAdam is a technical writer who specializes in developer documentation and tutorials.

Post navigation

What Does Td Colspan Have To Do With Tables In HTML?Applets

Search HTML.com

Search for:

Most Popular

  • <var> HTML Tag252 views
  • Using The HTML Tag To Create Inline Frames: Here's How178 views
  • Input Pattern: Use It To Add Basic Data Validation In HTML5147 views
  • What Does In HTML: Easy Tutorial With Code Example125 views
  • What Is Doxing? (And Why Is It So Scary?): An Infographic122 views

Từ khóa » Html5 Ul Tag