How to set the border color of a table without CSS?

8

Is there any way? I do not want CSS neither external, nor internal, just plain html. Follow my code.

<table widths="30;60" cellpadding="1.5" border="1">
        <tr>
            <td>
                <p >Data:</p>
            </td>
            <td bgcolor="#dddddd">
                <p>@Model.DatFormulario</p>
            </td>
        </tr>
</table>
    
asked by anonymous 28.03.2014 / 21:27

5 answers

8

So use bordercolor of the 'table' tag:

 <table widths="30;60" cellpadding="1.5" border="1" bordercolor=red>
        <tr>
            <td>
                <p >Data:</p>
            </td>
            <td bgcolor="#dddddd">
                <p>@Model.DatFormulario</p>
            </td>
        </tr>
</table>
    
28.03.2014 / 21:29
4

One of the ways (and that works consistently across browsers ) is to set the background of the table for a color, put a cellspacing, and then color the background of each white cell color you want), so that the table background appears between cells, and looks like a border:

<table width="728" cellspacing="2" cellpadding="0" border="0" align="center" bgcolor="#ff6600">
    <tr bgcolor="#ffffff">
        <td width="240" height="67">&nbsp;</td>
        <td width="240">HTML table borders without CSS</td>
        <td width="240">&nbsp;</td>
    </tr>
    <tr bgcolor="#ffffff">
        <td height="67">cellspacing="2"</td>
        <td>&nbsp;</td>
        <td>bgcolor="#ff6600"</td>
    </tr>
</table>

jsfiddle

Reference:

HTML table borders without CSS

    
28.03.2014 / 21:36
3
___ erkimt ___ How to set the border color of a table without CSS? ______ qstntxt ___

Is there any way? I do not want CSS neither external, nor internal, just plain html. Follow my code.

%pre%     
______ azszpr10971 ___

So use bordercolor of the 'table' tag:

%pre%     
______ azszpr10975 ___

One of the ways (and that works consistently across browsers ) is to set the background of the table for a color, put a cellspacing, and then color the background of each white cell color you want), so that the table background appears between cells, and looks like a border:

%pre%

jsfiddle

Reference:

HTML table borders without CSS

    
______ ___ azszpr10974

You can use the bordercolorlight

  

This is the color of the border (If you have turned on the border - that is if you use the border attribute in your TABLE tag).

That in free translation:

  

This is the border color (if you have connected the border - that is, if you use the border attribute in your TABLE tag). In Netscape, this will only color the background and right border.

And you can still set the standard for light and dark colors the edges using the attributes bordercolordark and tr .

These attributes apply only to the outer edge of the table, there is no to manipulate the edges td and%% %code% in this case you must use .

    
______ azszpr10973 ___

Examples:

%code% with attribute %code% for internal CSS usage.

%pre%

%code% with attribute %code% for color change.

%pre%

%code% use a color in hexadecimal or English name (red, black, green, etc).

    
______ azszpr150948 ___

It's possible! Just put inside the table tag:

%pre%

Source: link

    
___
28.03.2014 / 21:35
2

Examples:

HTML with attribute style for internal CSS usage.

  <table widths="30;60" cellpadding="1.5" border="1" style="border-style:solid; border-color:#0000ff;">

HTML with attribute bordercolor for color change.

  <table widths="30;60" cellpadding="1.5" border="1" bordercolor="#ff0">

bordercolor - use a color in hexadecimal or English name (red, black, green, etc).

    
28.03.2014 / 21:30
-1

It's possible! Just put inside the table tag:

<table bordercolor="aqui_a_cor_desejada">

Source: link

    
04.09.2016 / 05:46