Which of the following is type value of unordered list?

    : The Unordered List element

The

    HTML element represents an unordered list of items, typically rendered as a bulleted list.

    Content categoriesPermitted contentTag omissionPermitted parentsImplicit ARIA rolePermitted ARIA rolesDOM Interface
    Flow content, and if the
      element's children include at least one
    • element, palpable content.
    Zero or more
  • , and elements.
  • None, both the starting and ending tag are mandatory.
    Any element that accepts flow content.
    list
    directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree
    HTMLUListElement

10 Lists

Contents

  1. Introduction to lists
  2. Unordered lists [UL], ordered lists [OL], and list items [LI]
  3. Definition lists: the DL, DT, and DD elements
    1. Visual rendering of lists
  4. The DIR and MENU elements

HTML Unordered List | HTML Bulleted List

HTML Unordered List or Bulleted List displays elements in bulleted format . We can use unordered list where we do not need to display items in any particular order. The HTML ul tag is used for the unordered list. There can be 4 types of bulleted list:

  • disc
  • circle
  • square
  • none

To represent different ordered lists, there are 4 types of attributes in

    tag.

    TypeDescription
    Type "disc"This is the default style. In this style, the list items are marked with bullets.
    Type "circle"In this style, the list items are marked with circles.
    Type "square"In this style, the list items are marked with squares.
    Type "none"In this style, the list items are not marked .

    HTML Lists

    In this tutorial you will learn how to create different types of lists in HTML.

      In HTML Attributes

      Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
      Attribute of
        HTML TagWhat does
          do?Was used to set list types.

          HTML Unordered Lists

          ❮ Previous Next ❯

          The HTML

            tag defines an unordered [bulleted] list.

            HTML
              Tag

            Previous Complete HTML Reference Next

            Example

            An unordered HTML list:


            • Coffee

            • Tea

            • Milk

            Try it Yourself »

            More "Try it Yourself" examples below.

            Introduction to HTML Unordered List

            Lists in HTML are a concept of gathering a number of data or elements arranged in a specific order organized for the purpose of being used in the program execution. HTML uses three types of lists, namely Ordered List, Unordered List and Definition List, where Unordered List is a type of list where the data or elements can be arranged in the list in no specific order. The syntax for the HTML Unordered List is

            • ………..
            , where
              is the tag that indicates the unordered list type.

              The three types of lists we could use to bring order to the web pages. Below are the different types:

              Start Your Free Software Development Course

              Web development, programming languages, Software testing & others

              1. Ordered List
              2. Unordered list
              3. Definition List

              In this article, we shall go through the unordered list specification with an example. The unordered list is a list that doesn’t require any order of numbering in their list; instead, we use bullets for the list levels.

              Syntax ofHTML Unordered List

              The syntax for the unordered list is similar to the ordered list we created in the previous article. Unordered list is created using an element named

                element and ends with
              tag. The list item is embedded inside the
                element.



                • ………..

                Example #1

                This shows how this short item list is implemented in a browser.



                Demo on Unordered list


                Demo on Unordered list


                Ingredients for making of cake




                • Baking Powder

                • Flour

                • Sugar

                • Coco poder




                Popular Course in this category
                HTML Training [12 Courses, 19+ Projects, 4 Quizzes]12 Online Courses | 19 Hands-on Projects | 89+ Hours | Verifiable Certificate of Completion | Lifetime Access | | 4 Quizzes with Solutions
                4.5 [8,343 ratings]
                Course Price

                View Course
                Related Courses
                Bootstrap Training [2 Courses, 6+ Projects]XML Training [5 Courses, 6+ Projects]CSS Training [9 Courses, 9+ Projects]

                Output:

                This will give you the result like

                Example #2

                Unordered List with colors and for the positions.




                unordered list Demo2


                Unordered Disc



                • Lion

                • Tiger

                • Giraffe

                • Camel


                Top Rhymes



                • Johny Johny Yes papa

                • Wheels on the Bus

                • Baa Baa Black Sheep


                Fruits Name List



                • Avacado

                • Orange

                • Pears

                • Banana



                Output:

                Types of Attributes for HTML Unordered List

                To figure the unordered list, there are three primary types of attributes for this unordered element. The unordered list is used where it is not required to represent the lists in any specific orders. The following sections explain the related attributes and examples of them.

                This attribute gives the type of bullets to be used in the list.

                • type =’disc’ – Gives default bullet structure
                • type =’square’ – Looks like solid box bullets
                • type =’circle’ – Gives Hollow box structure

                1. Attribute type=’disc.’

                This is the default type, and all the items are marked as bullets. Here we use type attribute, and all these attributes support in HTML 3, To define under HTML5, we are supposed to implement list-style CSS. Here is an example demo.

                Example:



                Demo on Unordered list Types


                Demo on Unordered list Types



                • This is Program Agenda.

                  • First a Welcome Note
                  • Second We Start with the talks

                • Opening Speech
                • Mrs.Claria Winston from Ireland and Eyjolfur From Bank of America.
                • Tea Break
                • Last part from the topic Data Lake By Surendran Thomas.


                Output:

                2. Attribute type=’square.’

                Here the items are marked with Square bullets.

                Example:

                Demonstrating the HTML code with the square bullet embedded with style color and the position.






                ul {
                list-style: square;
                }
                ul li::before {
                content: "\1022";
                color: pink;
                font-weight: bold;
                display: inline-block;
                width: 0.8em;
                margin-left: -1em;
                }



                List of top hollywood movies-Square



                • World Of the wars

                • Mission Impossible

                • Independence Day special

                • Behind enemy lines



                Output:

                3. Attribute type=’circle.’

                This attribute gives hollow bullet values. Below are the example rendering circle and square attribute together with the nested lists.

                Example:



                EDUCBA List Example
                ;style>
                h3{
                color:orange;
                }
                ul{
                list-style: none;
                }
                ul li::before {
                content: "\25AA";
                color: brown;
                display: inline-block;
                width: 1em;
                margin-left: -0.8em;
                font-weight: bold;
                font-size:1rem;
                }



                List of Mobiles



                • Redmi Xiami
                • Iphone
                • Samsung
                • Nokia

                Mobile Operating System Supports



                • Android
                • Windows phone
                • Samsung
                • Nokia


                Output:

                Replacing HTML list Items with Customizable Images

                This would ultimately enhance the overall theme and makes the website visually good. The default bullets are replaced by native style or even can customizable using images with CSS help. Actually speaking, there are three styling lists to be used in HTML. Here we go with a list-style-type and list-style-image.

                Using image bullet is to make the lists more unique and differentiate the information by type, Giving the presentation a look on the web page.

                In the below example, the examples are demonstrated by style properties between the list elements.

                Example #1 – Style properties between the list elements




                HTML unordered list with Styles



                ul li {
                background: red;
                }
                ul.in.li {
                list-style: circle inside none;
                color: red;
                left: -20px;
                position: inside;
                text-align: left;
                width: 27px;
                }


                • Finland is a Scandinavian Country

                • Oslo is the capital city

                • Iceland is known for its beauty , hiking, fishing

                • Ranked among the chillness country in europe



                Output:

                This will give out the output like

                Example #2 – With image style





                ul {
                list-style-image: url['sqpurple.gif'];
                }



                The list-style- Demo


                Harry Potter Characters:



                • Harry

                • Hermione

                • Ron Weasely



                Output:

                Conclusion

                Now that we come across how to build unordered lists in HTML. We have seen how the unordered block element plays a role in creating web pages with different examples and explored some list features. Even this can be used in navigation menus to display vertically. The creation of an Unordered list is very simple; it is key important to consider where to fix this approach for the best bit place. In other words, the perfect document prefers to use an HTML list format.

                Recommended Articles

                This has been a guide toHTML Unordered List. Here we discuss the syntax and types of attributes forHTML Unordered List with examples. You may also have a look at the following articles to learn more–

                1. HTML Blocks
                2. HTML List Styles
                3. Basic HTML Tags
                4. HTML Commands

                HTML Training [12 Courses, 19+ Projects, 4 Quizzes]

                12 Online Courses

                19 Hands-on Projects

                89+ Hours

                Verifiable Certificate of Completion

                Lifetime Access

                4 Quizzes with Solutions

                Learn More

                1 Shares
                Share
                Tweet
                Share

                HTML List MCQs

                HTML List MCQs : This section focuses on "Lists" in Html. These Multiple Choice Questions [mcq] should be practiced to improve the Html skills required for various interviews [campus interview, walk-in interview, company interview], placement, entrance exam and other competitive examinations.

                1.Which one of the following is a type of lists that HTML supports?

                A. Ordered lists.
                B. Unordered lists.
                C. Description lists.
                D. All of the above

                View Answer

                Ans : D

                Explanation: All the three are types of lists in HTML.


                2.By which tag, an unordered list is represented?

                A.
                B.
                C.


                  D.

                    View Answer

                    Ans : C

                    Explanation:

                      tag is for unordered list. is for underline.


                    3.By which tag, an ordered list is represented?

                    A.
                    B.
                    C.


                      D.

                        View Answer

                        Ans : D

                        Explanation:

                          tag is for an ordered list.


                        4.Below there is a HTML code.
                        Fill in the blanks in the above HTML code with a suitable option so as to get the list as follows when executed in a browser.

                        • Physics
                        • Chemistry
                        • Mathematics

                        A. style="list-style-type:square;"
                        B. style="list-type:square;"
                        C. style="type:square;"
                        D. style= "style:square;"

                        View Answer

                        Ans : A

                        Explanation: In order to determine the type of item marker in an unordered list of HTML, list-style-type is used.


                        5..Fill in the blanks with a suitable option in order to number items of an ordered list with small roman numbers.

                        1. Physics
                        2. Chemistry
                        3. Mathematics

                        A. style= "type:i"
                        B. style= "list-style-type:i"
                        C. type= "i"
                        D. type= "small roman"

                        View Answer

                        Ans : C

                        Explanation: In the ordered list of HTML, type= "i" is used to number the ordered list with small roman numbers.


                        6.In order to start a list from 10, what attribute should be added in the opening tag of ordered list?

                        A. begin= "10"
                        B. start= "10"
                        C. style= "begin:10"
                        D. style= "start:10"

                        View Answer

                        Ans : B

                        Explanation:

                          will start numbering the items in the list from 10.


                        7.A HTML code is given below
                        Fill in the blanks with appropriate option to get the output as below:

                        ____ Mathematics ____ ____Calculus____

                        A. ,,,
                        B. ,,,
                        C.

                      1. ,
                      2. ,,
                        D. ,,
                      3. ,

                      4. View Answer

                        Ans : B

                        Explanation: This option will give the required output. Here is the description term and

                        is used to describe the description term.

                        8.In order to get a list without any item marker, which one of the following can be used?

                        ____ Mathematics ____ ____Calculus____

                        A.


                          B.

                            C.

                              D.

                                View Answer

                                Ans : A

                                Explanation: This option will remove the item marker and will simply display the elements of the list without them.


                                9.What is the default start of item marker in ordered list?

                                A. 1
                                B. i
                                C. I
                                D. None of the above

                                View Answer

                                Ans : A

                                Explanation: If the ordered list is written without any attribute, e.g

                                  , the list will start from 1 by default.


                                10.What is the default item marker in unordered lists of HTML?

                                A. Circle
                                B. Marker
                                C. disc
                                D. None of the above

                                View Answer

                                Ans : C

                                Explanation: By default, the unordered list has disc as its item marker.




                                Also check :

                                • Html Form MCQs
                                • Html Headings MCQs
                                Discussion


                                * You must be logged in to add comment.

                                Video liên quan

      Bài mới nhất

      Chủ Đề