YouTip LogoYouTip

Att Ul Type

# HTML <ul> `type` Attribute The `type` attribute of the `
    ` (unordered list) tag is used to specify the type of bullet point (marker) that appears next to each list item. --- ## Quick Example The following example demonstrates how the `type` attribute was traditionally used to change list markers to squares: ```html
    • Coffee
    • Tea
    • Milk
    ``` --- ## Browser Support The `type` attribute is supported by all major browsers, including Google Chrome, Mozilla Firefox, Safari, Microsoft Edge, and Opera. However, **this attribute is deprecated** (see the (#important-compatibility-notes) below). --- ## Definition and Usage The `type` attribute defines the visual style of the bullet points in an unordered list. ### Deprecation Warning * **HTML5 does not support the `
      ` `type` attribute.** * This attribute was deprecated in HTML 4.01 in favor of Cascading Style Sheets (CSS). * Modern web development standards require using the CSS `list-style-type` property instead. --- ## Syntax ```html
        ``` ### Attribute Values | Value | Description | | :--- | :--- | | `disc` | **Default value.** A filled circle (bullet). | | `circle` | An unfilled circle. | | `square` | A filled square. | --- ## Important Compatibility Notes Because the `type` attribute is obsolete in HTML5, you should use CSS to style your list markers. This ensures your code remains compliant with modern web standards and renders consistently across all devices. ### Modern CSS Alternative To change the list marker style using CSS, use the `list-style-type` property. #### Inline CSS Example: ```html
        • Coffee
        • Tea
        • Milk
        ``` #### External/Internal CSS Example: ```css /* Apply square bullets to all unordered lists */ ul { list-style-type: square; } ``` Using CSS also unlocks a wider variety of marker options beyond just `disc`, `circle`, and `square`, such as custom images, emojis, or custom counter styles.
← Att Video AutoplayAtt Thead Valign β†’