Prev Next

HTML <ul> tag

In HTML, the <ul> tag creates an unordered list.

By default, the items under an unordered list are bullet points so it is also called as bulleted list.

To create the list of items inside the unordered list, you should use the <li> tag. 

Syntax:<ul>list elements…</ul>

Example

<ul> <li>January</li> <li>February</li> <li>March</li> <li>April</li> <li>May</li> <li>June</li> <li>July</li> <li>August</li> <li>September</li> <li>October</li> <li>November</li> <li>December</li> </ul> Run the Code

CSS Default Values

display: block;list-style-type: disc;margin-top: 1em;margin-bottom: 1 em;margin-left: 0;margin-right: 0;padding-left: 40px;

How Browser will display

INLINE.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
None None In HTML5, the compact and type attributes are deprecated.

Attributes used with <ul> tag

Attribute Description
type To define the type of marker for the items of the unordered list. This tag can take any one of these values -
  • disc - Default value
  • circle
  • square
  • (HTML5 does not support the <type> attribute). It is better to use CSS.
    compact To make the list compact. This makes the list appear smaller than the normal size. (HTML5 does not support the <compact> attribute)

    Global Attributes

    The <ul> tag supports Global attributes.

    Event Attributes

    The <ul> tag supports Event attributes.

    Supporting Browsers

    supporting-browsers for tags

    Related Tags

    <ol> and  <li> tags.

    Prev Next Facebook Twitter Google-plus

    🎉 100%-OFF Udemy Coupons (New Daily)

    Grab premium courses for ₹0. We verify coupons daily so you don’t waste time on expired links.

    Browse Free Coupons → Top-Rated • Expiring Soon • By Language

    Tutorials for all brains!

    HTML Tutorials

    HTML Home HTML Requirements HTML Getting Started HTML Tags HTML Headings and paragraphs HTML elements HTML Comments HTML Formatting HTML Attributes HTML Lists HTML Phrase tags – Citation and Quotation HTML Images HTML Links HTML Tables HTML Fonts HTML Blocks HTML Forms HTML Head HTML Meta Tags HTML Styles HTML Backgrounds HTML Colors HTML Color Values HTML Entities HTML Character Encoding HTML URL Encodes HTML Iframes HTML JavaScript HTML XHTML HTML Responsive Web Design

    Advanced

    HTML5 Canvas HTML5 SVG HTML5 Audio HTML5 Video

    Cheat Sheet & Reference

    HTML Cheat Sheet HTML Tags - Alphabetical order HTML Tags List Reference

    Complete Tag List

    <!--..--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <h1> - <h6> <head> <header> <hgroup> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <keygen> <label> <legend> <li> <link> <main> <map> <mark> <menu> <menuitem> <meta> <meter> <nav> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <svg> <table> <tbody> <td> <template> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr>

    Từ khóa » Html5 Ul Tag