In html table, set different colors and widths for each cell

In html table, set different colors and widths for each cell
It is recommended that you do not set the width, height, etc. directly in the table, as this often results in the settings not taking effect.

If you add settings in style, there will be no problem. You can copy the code directly to the middle of body and use it.

Copy code
The code is as follows:

<table cellspacing="0" style="color:#FFF; text-align:left; font-size:14px; font-weight:bold; margin-left:220px; width:980px; height:200px;text-align:center">
<tr>
<td bgcolor="e91e6f"; style=" width:196px;">01</td>
<td bgcolor="224071"; style=" width:196px;">02</td>
<td bgcolor="f12339"; style=" width:196px;">03 </td>
<td bgcolor="1ea27e"; style=" width:196px;">04</td>
<td bgcolor="224071"; style=" width:196px;">05</td>
</tr>
<tr>
<td bgcolor="1ea27e">06</td>
<td bgcolor="e91e6f">07</td>
<td bgcolor="224071">08</td>
<td bgcolor="f12339">09 </td>
<td bgcolor="1ea27e">10</td>
</tr>
<tr>
<td bgcolor="e91e6f">11</td>
<td bgcolor="224071">12</td>
<td bgcolor="f12339">13</td>
<td bgcolor="1ea27e">14 </td>
<td bgcolor="224071">15</td>
</tr>
<tr>
<td bgcolor="1ea27e">16</td>
<td bgcolor="e91e6f">17</td>
<td bgcolor="224071">18</td>
<td bgcolor="f12339"></td>
<td bgcolor="1ea27e"></td>
</tr>
</table>

Effect picture:

<<:  SQL implementation LeetCode (185. Top three highest salaries in the department)

>>:  VMware, nmap, burpsuite installation tutorial

Recommend

MySql Sql optimization tips sharing

One day I found that the execution speed of a SQL...

Detailed explanation of JavaScript object conversion to primitive value

Table of contents Object.prototype.valueOf() Obje...

11 common CSS tips and experience collection

1. How do I remove the blank space of a few pixels...

JavaScript single thread and asynchronous details

Table of contents 1. Task Queue 2. To explain som...

How to configure Java environment variables in Linux system

Configure Java environment variables Here, the en...

An article teaches you how to use Vue's watch listener

Table of contents Listener watch Format Set up th...

Detailed steps to install the NERDTree plugin in Vim on Ubuntu

NERDTree is a file system browser for Vim. With t...

8 examples of using killall command to terminate processes in Linux

The Linux command line provides many commands to ...

Detailed explanation of the WeChat applet request pre-processing method

question Because some of our pages request data i...

Detailed steps to delete environment variables in Linux

How to delete environment variables in Linux? Use...