Azure Devops Wiki Markdown Table Style Background/text color problem

Viewed 1364

I am trying to color the cells of a table in Azure DevOps Wiki Table I have this in my markdown

|Tag|Requied/Optional  |Notes  |Examples  |
|--|--|--|--|
| <td style="background-color:green;color:white;">1</td> | <td style="background-color:green;color:white;">2</td> | <td style="background-color:green;color:white;">3</td> | <td style="background-color:green;color:white;">4</td> |
|  |  |  |  |
|  |  |  |  |

but it comes out looking like this enter image description here

Im trying to figure out why/where the extra cells in between are coming from and how to get rid of them.

2 Answers

You can try it with inline styling

<table style="border:ridge 4px red">
  <tr style="background-color:blue;color:white;" id="ROW1">
    <td style="border:ridge 4px red" >Cell 1.1</td>
    <td style="border:ridge 4px red">Cell 1.2</td>
    <td style="border:ridge 4px red">Cell 1.3</td>
  </tr>
  <tr style="background-color:yellow;color:green;" id="ROW2">
    <td style="border:ridge 4px red">Cell 2.1</td>
    <td style="border:ridge 4px red">Cell 2.2</td>
    <td style="border:ridge 4px red">Cell 2.3</td>
  </tr>
</table>

Also please refer this SO thread How to apply color in Markdown for more information.

You are duplicating the table information within the Markdown table syntax, instead you need to just apply the colour information via span.

Due to this I haven't found a way of fully colouring the cell background, just the text...

|Tag|Required/Optional  |Notes  |Examples  |
|--|--|--|--|
| <span style="background-color:green;color:white;">1</span> | <span style="background-color:green;color:white;">2</span> | <span style="background-color:green;color:white;">3</span> | <span style="background-color:green;color:white;">4</span> |
|  |  |  |  |
|  |  |  |  |
Related