Markdown list inside a table

2019-04-21 14:24发布

问题:

As per title,

Is it possible to put a list inside a table in markdown?

I tried to search it up but could not find anything.

A Table being something like:

Fruit    |Color
---------|----------
Apples   |Red
Pears    |Green

and a list being something like

  • List item 1
  • List item 2

回答1:

You can combine HTML inside Markdown to create the list, like so:

Version | Name | Features
-------:|------|----------
1.0     |Alpha |<ul><li>Supports</li><li>lists</li><li>with HTML</li></ul>


回答2:

If I understood your question correctly, you are trying to create a list (unorganzied) inside a table. in order to that you need to create a table, and create a unorganazied list within it.

<table border="1">
<tr>
<td>Fruits</td>
<td>Colors</td>
</tr>
<tr>
<td>
    <ul>
        <li>Apples</li>
        <li>Pears</li>
    </ul>
</td>
<td>
    <ul>
        <li>Red</li>
        <li>Green</li>
    </ul>
</td>
</tr>
</table>

This is ofcourse an inapropriate explanation, I would reccomend learning properly (I really like codeacademy).

Good luck :)



标签: html markdown