Html list tag LEARNOVITA

HTML Lists Tag Tutorial : Step-by-Step Guide for Beginners

Last updated on 12th Aug 2022, Blog, Tutorials

About author

Yeshwant singh (Html Developer )

Yeshwant Singh is an Html Developer with 6+ years of experience in a reputed company. He has expertise in HTML and CSS, PHP and MySQL, Javascript, and Node JS. He spends most of his time researching technology and startups.

(5.0) | 18745 Ratings 2102

HTML Lists:

HTML Lists are used to specify the lists of information. All lists may contain one or more list elements:

  • <"ul"> − An unordered list. This will list the items using plain bullets.
  • <"ol"> − An ordered list. This will use various schemes of numbers to list your items.
  • <"dl"> − A definition list. This arranges items in the same way as they are arranged in the dictionary.

HTML Unordered Lists:

  • An unordered list is a gathering of related items that have no special order or a sequence.
  • This list is made by using the HTML <"ul"> tag. Every item in the list is marked with a bullet.
  • HTML offers web authors3 ways for specifying lists of information.

HTML Unordered Lists:

This list is created by using HTML <"ul"> tag:

Example:

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Unordered List<"/title">
  • <"/head">
  • <"body">
  • <"ul">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ul">
  • <"/body">
  • <"/html">
  • his will produce the below result −

    The type Attribute:

    HTML

    Can use type attribute for <"ul"> tag to denote the type of bullet like. By default, it is a disc. Following are the possible options −

  • <"ul type = "square">
  • <"ul type = "disc">
  • <"ul type = "circle">
  • Example:

    Below is an example where we used <"ul type = "square">

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Unordered List<"/title">
  • <"/head">
  • <"body">
  • <"ul type = "square">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ul">
  • <"/body">
  • <"/html">
  • This will produce the below result –

    Example:

    Below is an example where we used <"ul type = "disc"> −

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Unordered List<"/title">
  • <"/head">
  • <"body">
  • <"ul type = "disc">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ul">
  • <"/body">
  • <"/html">
  • This will produce the below result –

    Example:

    Below is an example where we used <"ul type = "circle"> −

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Unordered List<"/title">
  • <"/head">
  • <"body">
  • <"ul type = "circle">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ul">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    HTML Ordered Lists:

    If required to put an item in a numbered list instead of bulleted, then an HTML ordered list will be used.This list is generated by using <"ol"> tag. The numbering starts at a one and is incremented by one for each successive ordered list element tagged with <"li">.

    Example:

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    The type Attribute:

    Can use type attribute for <"ol"> tag to specify the type ofa numbering are like. By default, it is a number. Following are the possible options are−

    • <"ol type = “1”> – Default-Case Numerals.
    • <"ol type = “I”> – Upper-Case Numerals.
    • <"ol type = “i”> – Lower-Case Numerals.
    • <"ol type = “A”> – Upper-Case Letters.
    • <"ol type = “a”> – Lower-Case Letters.
    HTML tag list

    Below is an example where we used <"ol type = "1">

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol type = "1">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    Example:

    Below is an example where we used <"ol type = "I">

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol type = "I">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    Example:

    Below is an example where used <"ol type = "i">

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol type = "i">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    Example:

    Below is an example where used <"ol type = "A" >

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol type = "A">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    Example:

    Below is an example where used <"ol type = "a">

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol type = "a">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    The start Attribute:

    Can use a start attribute for <"ol"> tag to specify the starting point of the numbering needed. Following are the possible options −

    • <"ol type = "1" start = "4"> – Numerals start with 4.
    • <"ol type = "I" start = "4"> – Numerals start with IV.
    • <"ol type = "i" start = "4"> – Numerals start with iv.
    • <"ol type = "a" start = "4"> – Letters start with d.
    • <"ol type = "A" start = "4"> – Letters start with D.

    Example:

    Below is an example where we used <"ol type = "i" start = "4" >

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Ordered List<"/title">
  • <"/head">
  • <"body">
  • <"ol type = "i" start = "4">
  • <"li">Beetroot<"/li">
  • <"li">Ginger<"/li">
  • <"li">Potato<"/li">
  • <"li">Radish<"/li">
  • <"/ol">
  • <"/body">
  • <"/html">
  • This will produce the below result −

    HTML Definition Lists:

    HTML and XHTML supports a list style which is called a definition lists where entries are listed like in the dictionary or encyclopedia. The definition list is an ideal way to present a glossary, list of terms, or other name/value list.Definition List made use of following 3 tags.

    • <"dl"> − Defines the start of a list
    • <"dt"> − A term
    • <"dd"> − Term definition
    • <"/dl"> − Defines the end of a list

    Example:

  • <"!DOCTYPE html">
  • <"html">
  • <"head">
  • <"title">HTML Definition List<"/title">
  • <"/head">
  • <"body">
  • <"dl">
  • <"dt"><"b">HTML<"/b"><"/dt">
  • <"dd">This stands for Hyper Text Markup Language<"/dd">
  • <"dt"><"b">HTTP<"/b"><"/dt">
  • <"dd">This stands for HyperText Transfer Protocol<"/dd">
  • <"/dl">
  • <"/body">
  • <"/html">
  • Are you looking training with Right Jobs?

    Contact Us

    Popular Courses