Markdown bullet list5/17/2023 ![]() ![]() So, you must have to start numbering the list items from “1” so it goes in the proper order of numbers. You can see in the output that the list starts from 5 and then adds the numbers sequentially onward. This is because markdown just considers the first provided number and then orders the list sequentially, starting from that particular number onward.įor your convenience, we will provide another example where the first number we have specified is “5” and then some random numbers. You can observe the numbers are added randomly.īut the preview window shows us the output list with a sequential list starting from 1. Now let’s see what will happen if we add random numbers to the list with the same items. Here is the output for the above-written markdown script. Here we have started the list with the number “1,” which goes sequentially up to “7”. To create an ordered list with these items, we have added the numbers, a period, and the name of the item. We have created a list with 7 items as “Red”, “Blue”, “Purple”, “Orange”, “Yellow”, “Pink”, and “White”. For creating an ordered list, the number specified for the first list item will determine the starting number of the output sequential list number. The ordered lists are those whose items are added with the numbers. This illustration will let us understand the markdown ordered lists and how to create nested ordered lists. The rendered output can be observed in the image attached below, which shows a heading, subheading, and then nested unordered markdown lists.Įxample # 2: Ordered Nested Lists in Markdown So we the first list item as “Pakistan” and within it, the sublist is added as “Islamabad”, then the next item of the list as “Iran” with sublist item “Tehran”, 3 rd list item appended is “Afghanistan” having sublist item “Kabul”, then “India” with nested list item “Delhi” and lastly the “China” having sublist item “Beijing”. Then the dash (-), space, and name of the sublist are scripted. To add a list within this list, in the next line of the script, we have to add four spaces. We have added the dash (-) symbol to create the first list item as “Pakistan”. And the string for the heading is “The list of countries, and their capitals are:”. Then in the next line, we introduce a subheading by using the triple hashes, which refer to the “h3” heading. The text we have specified for the heading is “Countries with Capital Cities”, so this will be our main heading. The one “#” refers to the “h1” heading style. We first added a heading by using the hash (#) symbol and a space before the heading text. We are picking the Dash (-) technique to create the unordered nested lists. We have learned from this that all these techniques will render the same output unordered list with items shown with bullets.įor making the nested lists, the techniques that can be employed are the same as those discussed above. Now we’ll check it with the last technique, which is adding the Asterisks (*) before the list item name.īy adding the Asterisks, even we get the same bullet lists. This gives us the same output which we got for the above exercise technique. Here we just have replaced the Dashes (-) with the Plus sign (+). Now we will use the Plus sign (+) sign to make the markup unordered list. The result can be seen in the snapshot attached below. The preview window shows us 5 list items which are displayed with bullets. Here we have made a list with 5 items which are “Pakistan”, “Iran”, “Afghanistan”, “India,” and the last item, “China”. As we are using the Dashes (-) to make an unordered list, when we move to the next line, it automatically puts the dash. For the next list, the markdown will detect the format and add the preceding tempo in the next script line automatically. To make a list with dashes, the pattern that needs to be followed is that we have to add a Dash (-), then a space, and the name of the list. We will first create a list by adding the Dashes (-) before the list item. These are Plus sign (+), Dashes (-), or Asterisks (*). To create an unordered list, markdown provides us with different options that can be utilized to generate an unordered list. This demonstration will elaborate on the technique of nesting the unordered lists in markdown. We will create nested lists using both types of markdown lists in this tutorial.įor the implementation of the script, the tool we are using here is Visual Studio Code.” Example # 1: Unordered Nested Lists in Markdown The first is the unordered list (bulleted), and the second is the ordered list (numbered). “In markdown, there are two kinds of lists that can be created. ![]()
0 Comments
Leave a Reply. |