Changing Table Background Colors on Mouseover in IE

Changing Table Background Colors on Mouseover in IE

We can change the background color of a table in HTML tables using the following method. We can place mouse pointer over each of the HTML table cells below to view this HTML mouseover effect. The HTML table cells will change to a specified color when we place our pointer over the cells.

In this way we can improve the presentation of HTML table data. Also it will give more professional look.

We can place the following code within the <TR> or <TD> tag of our HTML table code:

onMouseover=”this.bgColor=’#EEEEEE‘”onMouseout=”this.bgColor=’#FFFFFF’”

Table code might look something like this:

<TABLE BORDER=”2″ WIDTH=”100%”>
<TR onMouseover=”this.bgColor=’#EEEEEE‘”onMouseout=”this.bgColor=’#FFFFFF‘”>
<TD>Table Content1</TD>
</TR>
<TR onMouseover=”this.bgColor=’#EEEEEE‘”onMouseout=”this.bgColor=’#FFFFFF‘”>
<TD>Table Content2/TD>
</TR>
</TABLE>

We can change the background color indicated in bold according to our requirement.

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.