When I try to create table and try to add color, I suffered some problem.
in css selector
I defined id
,but selector #1
didn't work well.
Why this selector didn't work?
And How to fix it?
Thanks
td {
transition-duration: 0.5s;
border: solid black 1px;
padding: 5px;
}
table {
border-collapse: collapse;
}
#1{
background-color:aqua;}
#2{
background-color:aqua;}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table>
<tr>
<td id=1>1</td>
<td id=2>2</td>
<td id=3>3</td>
</tr>
<tr>
<td id=4>4</td>
<td id=5>5</td>
<td id=6>6</td>
</tr>
<tr>
<td id=7>7</td>
<td id=8>8</td>
<td id=9>9</td>
</tr>
</table>