Noob question about HTML table bordecolor

Hey guys!

I’m trying to format HTML tables, but cannot understand why I cant change the border color…

Using this code:

<table border=10 bgcolor=blue bordercolor=red cellspacing=15>
		<td>När en händelse inträffar</td>
		<td>Ett villkor att undersöka (TRUE/FALSE)</td>
		<td>Handling som utförs beroende på utfall av vilkoret</td>

Produces this result, with the standard coloring on borders:

Can anyone point out to me what I am doing wrong? I should really keep on studying, but got caught up with this instead :smile:

Things I have tried

bordercolor = red

bordercolor = "red"

bordercolor = #ffffff

You could use CSS for styling tables.

td, th {
  border-color:red !important;
  border-collapse: collapse;


The way forward is indeed through styling as @gapmiss indicates, and doing classes like they showed is the nicer solution, and could even be extended into snippets.

The reason I wanted to post this though, is first of all to say greetings from Norway to my Swedish poster, and secondly to show this alternate for the table header:

<table style="background-color: blue; border: 10px solid red; border-spacing: 15px;" > 

Here I apply the styling within the table itself, instead of separating out into its own component.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.