Tell us what’s happening:
Need help on question 4. Your table element should have five columns.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Book Inventory</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Book Inventory</h1>
<table>
<caption>Data 5</caption>
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Category</th>
<th>Status</th>
<th>Rate</th>
</tr>
</thead>
<tbody>
<tr class="read">
<th>Donkey Monkey</th>
<td>Mike IV</td>
<td>Western Fantasy</td>
<td><span class="status">Read</span></td>
<td><span class="rate three">
<span></span>
<span></span>
<span></span>
</span></td>
</tr>
<tr class="read">
<th>Journey down</th>
<td>Mount Olympus</td>
<td>Children's Books</td>
<td><span class="status">Read</span></td>
<td><span class="rate two">
<span></span>
<span></span>
<span></span>
</span></td>
</tr>
<tr class="to-read">
<th>Math and Wine</th>
<td>Heracles Heracles</td>
<td>Non-fiction</td>
<td><span class="status">To Read</span></td>
<td><span class="rate">
<span></span>
<span></span>
<span></span>
</span></td>
</tr>
<tr class="in-progress">
<th>Space Wonder</th>
<td>Archimedes Achilles Artemis</td>
<td>Sci-Fi Steampunk</td>
<td><span class="status">In Progress</span></td>
<td><span class="rate">
<span></span>
<span></span>
<span></span>
</span></td>
</tr>
</tbody>
</table>
</body>
</html>
/* file: styles.css */
tr[class="read"]{
background-image: linear-gradient(silver, gold)
}
tr[class="to-read"]{
background-image: linear-gradient(to left, cyan, magenta)
}
tr[class="in-progress"]{
background-image: linear-gradient(to bottom left, lightgreen 40%, red)
}
span {
display: inline-block;
}
tr[class="to-read"] span[class="status"] {
border: 2px dotted brown;
background-image: linear-gradient(rgb(208, 0, 255), orange);
}
tr[class="read"] span[class="status"] {
border: 2px solid black;
background-image: linear-gradient(red, orange);
}
tr[class="in-progress"] span[class="status"] {
border: 2px solid black;
background-image: linear-gradient(yellow, red);
}
span[class^="rate"] > span{
border: 1px solid rgb(54, 210, 11);
border-radius: 10% 50%;
margin: 10px;
height: 20px;
width: 20px;
background-color: blue;
}
span[class="status"], span[class^="rate"] {
height:10px;
width: 10px;
padding: 3px;
}
span[class~="one"] > span:first-of-type {
background-image: linear-gradient(rgba(255, 0, 0, 0.551), rgb(62, 62, 51));
}
span[class~="two"] > span:nth-of-type(-n+2) {
background-image: linear-gradient(rgba(255, 0, 0, 0.551), rgb(62, 62, 51));
}
span[class~="three"] > span {
background-image: linear-gradient(rgba(255, 0, 0, 0.551), rgb(62, 62, 51));
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App
https://www.freecodecamp.org/learn/full-stack-developer/lab-book-inventory-app/build-a-book-inventory-app