Skip to content

How could I have html elements inside a list item? #2267

Answered by ChristianMurphy
xuanswe asked this question in Q&A
Discussion options

You must be logged in to vote

Welcome @xuan-nguyen-swe! 👋
The example you give is already valid MDX, you could use it as-is, if you'd like.
Or if you prefer using markdown list syntax, you can, it would look something like the following:

1.  item 1
    <details>
      nested markdown for item details 1
      
      1.  item 1.1
      2.  item 1.2
    </details>
2.  item 2
    <details>
      nested markdown for item details 2

      1.  item 2.1
      2.  item 2.2
    </details>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xuanswe
Comment options

Answer selected by xuanswe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants