So from the (very little) that I've read about Markup Validation, it's basically just a grammar/spelling check. However, I can't find any sources on how to make "good" HTML code. Is there any site in which I can learn how to write HTML properly?
Here's my code that was called horrid (specifically the HTML).
<html>
<title>MySQL Search!</title>
<body>
<p>Search Results:</p>
<table width="600" border="1" cellpadding="1" cellspacing="1">
<tr>
<th>Card Name</th>
<th>Mana Cost</th>
<th>Card Set</th>
<th>Ability</th>
<th>Image</th>
</tr>
<?php
require 'dbconnect.php';
$Checkbox = $_POST['Ability'];
$q="SELECT * FROM mtgcards WHERE Ability LIKE '%$Checkbox%'";
$r = mysqli_query($dbc, $q);
while ($row = mysqli_fetch_array($r)) {
Echo "<td>" . $row['Name'] . "</td>";
Echo "<td>" . $row['Mana Cost'] . "</td>";
Echo "<td>" . $row['Colour'] . "</td>";
Echo "<td>" . $row['Set'] . "</td>";
Echo "<td>" . $row['Ability'] . "</td>";
Echo "<td>" . '<img style="display:block" src="data:image/jpeg;base64,' . base64_encode($row['Image']) . '" width="100%" height="100%" /></td>';
Echo "</tr>";
}
mysqli_close($dbc);
?>
</html>
</body>