I have a markdown table as below:
| 1 | 2 | 3 | |---|---|---| | 4 | 5 | 6 | | 7 | 8 | 9 |
I wish to set background color to red for a specific cell, e.g. cell 8. I found some forum discussed to use HTML syntax to set font color but not found anyone can set the whole cell background color to red.
Let's see how to do it. Just click on the 'BACKGROUND' button (1) from the header and then select the cell (2). From the left-hand side, select a color from the 'Selected Cell Background' (3). Then just click on 'Save Table' to save the changes.
Cell background colors are set by applying the bgcolor attribute to a <tr> tag (to color the row) or to a <td> tag (to color the cell). Cell colors override row colors which, in turn, override table background colors.
The HTML <table> bgcolor Attribute is use to specify the background color of a table. Attribute Values: color_name: It sets the text color by using the color name. For example “red”.
Markdown doesn't support color but you can inline HTML inside Markdown, e.g.: <span style="color:blue">some *blue* text</span>. As the original/official syntax rules state (emphasis added): Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.
The background-color is a part of the style. Markdown is only for content and structure.
But you can use css selectors
td:nth-child(n)
td + td
and overwrite it again td + td + td
Both versions with your example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With