Alphabetical sorted list with unexpected result

Dear, dear.
Health and Peace for everyone in the forum.
Please, I will report my question:
I have a page and in this contains text that I need to put a list with ordered items (ol).

What I’ve already done:
css

ol.especial {
    counter-reset: list;  
    list-style: none; 
	
}
ol.especial > li.especial {
   list-style: none; 
}
ol.especial > li:before {
    content: counter(list) ") ";
    counter-increment: list;
		
}

No

<body>

<ol class="especial">
  <li class="especial">Coffee</li>
  <li class="especial">Tea</li>
  <li class="especial">Coca Cola</li>
</ol>

result:

  1. Coffee
  2. Tea
  3. Coca-Cola

The result would be great if I wanted the items in numerical order. It happens that I wish in alphabetical order.

I tried <ol style="style list:lower-alpha">, which would be the right one, i.e., list ordered alphabetically looks like this:

a.1) Coffee
b. 2) Tea
c. 3) Coca-Cola

In short, I can’t create a list that’s a), b), c).

Thank you

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Dear
I posted with errors contrary as rules of the forum.
Well for forgiveness for what happened and that I do not deserve to have a satisfactory answer.
I have little knowledge of English and this hurts a lot.
I really appreciate your attention.

I’m not sure if I understand correctly, but are you trying to create this output:

a) Coffee
b) Tea
c) Coca-Cola

Here’s an article that describes how to make a list like a), b), c) (using parenthesis instead of dots):
https://www.codesd.com/item/order-list-html-lower-alpha-with-straight-parentheses.html

1 Like

Well, you are new to the forum so it is ok not to know how to format your code. :grinning:

Jsdisco
I don’t even know how to thank you. It’s really fantastic your knowledge, your competence. Receive my sincere thanks. If you ever need anything here in Rio de Janeiro and being in my way you can send an email to [EMAIL REDACTED]
You’ve seen that I’m very bad at English, but thank God find someone (you) who helped me.
Thank you and a big hug, wishing health and peace to you and family.

That’s a little too much praise for me, but thank you :love_you_gesture:
(P.S. I recommend you remove your email address to avoid spam, because these forums are scanned by Google)

Good morning

I agree to delete the email. Thank you

I tried and I think I blacked out. I get too tangled up with english.

I wish you and family a lot of health.

Hugs

Sorry

I promise I won’t keep asking you questions. It happens that I now need a normal list with an ordered number. for instance:

  1. Item 1

  2. Item 2

  3. Item 3

It turns out that when I

  • it gets alphabet a), b),…

    I have to do where 1 is. 2. 3.

    Thank you.

    Note: I’m afraid to post wrong and get called attention.

  • Please don’t, the forum needs questions - that is why it is here.

    Note: I’m afraid to post wrong and get called attention.

    Don’t be, just do you best. jwilkins.oboe is a knowledgeable and kind programmer. She was not trying to pick on you. Most people who first come to the forum do not know how to format code in a post. What she gave was a standard reply that we have to tell people how to do it. It was not meant as a criticism, but as an aid.

    She did not mean that you “do not deserve to have a satisfactory answer” - she may not have had time to do an answer but wanted to format your code so others could help and to help you learn how to post code.

    Sorry, I don’t have time to answer your latest question either - I’ll check back later to see if no one gets to it - but I just wanted to make sure that you understand that no one is criticizing you. We all started somewhere, we all had to learn this stuff, and we all support each other. This is probably the friendliest forum I’ve ever encountered. People are helpful here and we don’t tolerate any abuse.

    Ask as many questions as you like, you’re welcome.

    You can use different classes for different types of lists:

    <ul class="letters-ul">
      <li>Coffee</li>
      <li>Tea</li>
      <li>Water</li>
    </ul>
    
    <ul class="numbers-ul">
      <li>Ananas</li>
      <li>Banana</li>
      <li>Cherry</li>
    </ul>
    

    Put the styles you need for your letters list in a .letters-ul CSS selector, and the styles for the numbers list in a .numbers-ul selector:

    .letters-ul {
      // all your letter list styles
    }
    
    .numbers-ul {
      list-style-type: decimal
    }
    

    Dear kevinSmith,

    Thank you for your words. I’m going to keep trying within group rules. I liked to follow the posts the links… Very good!

    I’ll keep trying to create the ordered

      with type number:

      1. First item

      2. Second item

      3. Third item

      4. Fourth item

      Thanks again for the attention.

      Health and Peace.

    Dear KevinSmith,
    Jwilkins.oboe sent me an e-mail encouraging me, that was very kind.
    Thank you for your words Sir Kevin Smith. I’ll keep posting within the group rules. I liked the group, the links… Very good!
    In case I’m going to make a mistake, i’m always going to try to get it right.
    Thank you for your attention.
    Health and Peace.

    Thank you
    Learned! 
    Health Peace for All
    

    Hi again!

    I went ahead and removed your email from your earlier post.

    Happy coding!

    Hi jwilkins.oboe,
    Did I post wrong again?
    I thought my mistake was that I wasn’t </> for text. Isn’t that right? It’s okay to get attention. I have to learn.
    I’m sorry about the inconvenience.
    I wish Health and Peace for you and your Family.
    Hugs

    I removed your email address for privacy reasons.

    As mentioned earlier, the forum gets scanned by google and if you have sensitive personal information like email addresses on here then that can open you up to get spam emails.

    You only need to use that </> option for code.
    When you are just writing plain text, then you don’t have to use that </> option.

    Hope that makes sense!

    You don’t have to feel bad.
    You just joined the forum.

    You are still learning about it.

    No one thinks you are an inconvenience.
    We are all just here to help :grinning:

    Yes, yes Jessica Wilkins got it.

    In another post, if it’s not code, quote… i type normally and when it is the case to use the icons in the post area. correct?

    Thank you so much again for your attention.

    Just one more thing. When I get this type of email in addition to replying to the email Do I have to click the “Visit Topic” button and reply there in the forum?

    Thank you so much for your words. Your generosity helps a lot.

    Health, health!!!