We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Technology

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is a UL Tag?

By K. Powell
Updated: May 16, 2024
Views: 15,650
Share

An unordered or unnumbered list tag, better known in shorthand as the UL tag, provides a way for web page designers to display and group text on web pages as indented and bulleted lists. UL tags are used in hypertext markup languages (HTML) pages and as a style element defined in a cascading style sheet (CSS). While UL tags did not become standardized until HTML 2.0, it had been defined in the first published descriptions of HTML by Tim Berners-Lee in 1992. This element is supported by all major web browsers.

UL tags may be used in the BODY, DIV, CENTER, BLOCKQUOTE, FORM, TH, TD, DD, or LI tags. The UL tag in HTML is denoted by an opening <UL> and closing </UL> tag, which also inserts an empty space in the line before and after the tag. CSS UL tags, which provide additional formatting flexibility beyond the HTML UL tag, are defined within the ul {list-style-type: }, where value is defined as disc, circle or square, with the default being the disc. Individual list items are inserted between the <UL> tags, prefaced first by the LI, or list item, tag. The following HTML example shows how to use this tag to organize a list of fruit:

<UL>
<LI>Apples
<LI>Bananas
<LI>Oranges
<LI>Pineapples
</UL>

Unordered lists do require the use of attributes, although there are a core set of attributes – class, id, style and title – as well as a number of standard, or optional, attributes that may be useful to modify the look of an unordered list. Except for the compact and type attributes, which were standardized in version 2.0, optional attributes were not formally standardized until version 4.0.

The compact attribute squeezes both the bulleted text and definition onto one line. Type defines the bullet style, which automatically defaults to disc if no type is specified. Other pre-defined bullet types used in UL HTML tags include the square and circle. User-defined images may be used in place of pre-defined bullet types by specifying the location of the stored images using the src attribute, as in <UL src=”URL">. The uniform resource locator, or URL, indicates the location of the image. Starting with version 4.0.1, the compact and type attributes for the UL tag have been deprecated, meaning it may not be supported in future HTML versions.

Other attributes used to define the UL tag style include:

  • DIR: this attribute contains information regarding the direction of the text.
  • ID: defines the specific ID on the CSS property to tag.
  • LANG: encodes the language.
  • STYLE: defines the CSS inline style.

JavaScript event handlers, which define what happens, for example, if a mouse hovers over a HTML UL tag or when the user clicks on a list item, may also be used to refine an unordered list. Event handlers supported by UL tags include onClick, onDbClick, onMouseDown, onMouseUp, OnMouseOver, onMouseMOve, onMouseOut, onKeyPress, onKeyDown, and onKeyUp.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
Share
https://www.easytechjunkie.com/what-is-a-ul-tag.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.