Onur Aydoğdu Onur Aydoğdu - 1 year ago 84
CSS Question

I can't change table background color

I started to learn HTML5 and CSS yesterday.Today, I am learning creating table and change it's background color.I tried to change it with CSS but i couldn't.How can i make it with CSS3?

Answer Source

you should use background-color in CSS file:

table {
    background-color: #00bd72;

or inside html tag

<table style="background-color: #00bd72">

check this snippet I just made for you ;) Good luck learning CSS

    <h1>sample table</h1>
    <table style="background-color: #00bd72">
        <td>this is one cell</td>
        <td>this is another cell</td>
        <td>this is the second row</td>
        <td>blah blah ...</td>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download