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

Detailed steps for setting up host Nginx + Docker WordPress Mysql

environment Linux 3.10.0-693.el7.x86_64 Docker ve...

Example code for implementing equal width layout in multiple ways using CSS

The equal-width layout described in this article ...

Implementation of waterfall layout + dynamic rendering

Table of contents Typical waterfall website Water...

Detailed explanation of how to use eslint in vue

Table of contents 1. Description 2. Download rela...

Docker-compose quickly builds steps for Docker private warehouse

Create docker-compose.yml and fill in the followi...

Do you know how to use Vue to take screenshots of web pages?

Table of contents 1. Install html2Canvas 2. Intro...

How to create a file system in a Linux partition or logical volume

Preface Learn to create a file system on your sys...

Let’s talk in detail about how browsers view closures

Table of contents Preface Introduction to Closure...

jQuery combined with CSS to achieve the return to top function

CSS Operations CSS $("").css(name|pro|[...

How to start a Vue.js project

Table of contents 1. Node.js and Vue 2. Run the f...

How to use nginx to simulate canary release

This article introduces blue-green deployment and...

Basic learning and experience sharing of MySQL transactions

A transaction is a logical group of operations. E...

About ROS2 installation and docker environment usage

Table of contents Why use Docker? Docker installa...