lt(index) matches all elements with an index below the given one.
<html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("td:lt(2)").css("color", "red"); }); </script> </head> <body> <body> <table> <tr><td>First</td></tr> <tr><td>Middle</td></tr> <tr><td>Last</td></tr> </table> </body> </html>