Listing 1 - Examples of different table background colors with corresponding HTML code. Example.bgcolor inserted inside each
tag. This sets a background color for each row. Trying to find some code on how to change a tables row color by an onClick event.Chief function swapBG(obj) . var colour colour(obj.style.backgroundobj.id) ? "green" : obj.id obj.style. backgroundcolour Background color using Hex color codes. Coloring a webpage background is actually pretty simple.A second way is to use an HTML color name simply replace the HEX code with one of the 140 supported color names and youre good to go. Instead, use the CSS background-color property control the color of table rows. Using CSS instead of HTML attributes has the added benefit of being applied to multiple elements simultaneously if you wish.What that bit of code does is use the nth-child selector apply the background color ddd to This Row is Gray! HTML - Font and background together. First of all we put into practice an example of a table of scores coloring a table to highlight certain aspects.Miscellaneous. Checking HTML code and links / Valid HTML code. Encode HTML.