<head>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 1px solid black;
padding: 8px;
text-align: left;
}
</style>
</head>
<body>
<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>John</td><td>25</td></tr>
<tr><td>Jane</td><td>28</td></tr>
<tr><td>Smith</td><td>30</td></tr>
<tr><td>Emily</td><td>22</td></tr>
</table>
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>
<p>This is the third paragraph.</p>
<p>This is the fourth paragraph.</p>
<script>
$(document).ready(function() {
$("tr:even").css("background-color", "lightgray");
$("p:odd").css("color", "green");
});
</script>
</body>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.