The UL tag is used to display and group text on web pages as indented and bulleted lists. It is supported by all major web browsers and can be used in various HTML tags. Optional attributes can be used to change the appearance of the list, including the type of bullet and user-defined images. Event handlers can also be used to refine the list.
An unordered or unnumbered list tag, better known for short as a UL tag, provides web page designers with a way to display and group text on web pages as indented and bulleted lists. UL tags are used in hypertext markup language (HTML) pages and as a style element defined in a cascading style sheet (CSS). While UL tags weren’t standardized until HTML 2.0, they were 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 can be used in BODY, DIV, CENTER, BLOCKQUOTE, FORM, TH, TD, DD, or LI tags. The UL tag in HTML is indicated by an opening
Unordered lists require the use of attributes, although there are a basic set of attributes (class, id, style, and title) as well as a number of standard or optional attributes that can be useful for changing the appearance of an unordered list . With the exception of 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 compresses both the bulleted text and the definition onto one line. Type defines the style of the bullet, which defaults to disk if no type is specified. Other predefined bullet types used in UL HTML tags include the square and the circle. User defined images can be used instead of the default bullet types by specifying the location of the stored images using the src attribute, as in
Other attributes used to style the UL tag 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 the mouse hovers over an HTML UL tag or when the user clicks on a list item, can 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.
Protect your devices with Threat Protection by NordVPN