p.happy{color:red} p.sad{color:#7895B2} th.sun {color: red} th.mon {color: #ff69b4} th.tue {color: #f3981d} th.wed {color: #afdfe4} th.thu {color: #7e433e} th.fri {color: #ffd900} th.sat {color: #0095d9} td.s {color: red} td.n {color: blue} td.d {color: red} .a th:first-child{ background-color:#fe2d3c } .a th+th{ background-color:#fe2dd1 } .a th+th+th{ background-color:#fe8a2d } .a th+th+th+th{ background-color:#fef32d } .a th+th+th+th+th{ background-color:#2dfe54 } .a th+th+th+th+th+th{ background-color:#fe652d } .a th+th+th+th+th+th+th{ background-color:#2d5afe } td:first-child{ color:#fe2d3c } td:last-child{ color:#2d5afe }