HTML: Coloring Cells

Let’s see how to color the cells.

Programmazione HTML
Programmazione HTML
Follow FullPress on Google

Add us to your preferred sources.

Follow this source on Google

In the lesson dedicated to rows and columns, we left off here:

 

 
   

 

Do you remember it? Here’s what we had created:

 
   

Now, let’s color the 100px cell, the one at the bottom left, the smallest one:

 
   

Here’s the code with the color added to the cell:

 

 
   

 

With the support of bgcolor, we have given a background color to our small cell. Now let’s color them all with different colors. Let’s see how.

 
   

Here is the complete code:

 

 

We have effectively colored each individual cell that makes up the table. But what if we wanted to color the table in its entirety? Here’s the code to use:

 

 

We have assigned bgcolor to the table tag to color the table in its entirety. Here’s what you’ll get:

 
   

Since the table has borders, you will only get the coloring of the borders themselves, as each cell has been assigned a different color.

Pubblicato in

Se vuoi rimanere aggiornato su HTML: Coloring Cells iscriviti alla nostra newsletter settimanale

Be the first to comment

Leave a Reply

Your email address will not be published.


*