When I conducted an HTML5 validation check using W3 Validator for our client’s WordPress website, I eventually found this error

In HTML5, alt=”rel category tag” attribute is considered as bad value category tag by W3 Validator. So here my solution, I replace the similar line
<p>Categories: <?php the_category(' '); ?></p>
to
<?php
$category = get_the_category();
$separate = ', ';
$output = '';
if($category){
foreach($category as $cat) {
$output .= '<a href="'.get_category_link( $cat->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $cat->name ) ) . '">'.$cat->cat_name.'</a>'.$separate;
}
echo trim($output, $separate);
}
?>
I hope this tweak will also work for you.
Cheers,