I didn't understood this Im new to php css
but as you've defined your CSS at element level, already your styles are applied to your PHP code
Your PHP code is to be used with HTML like this
<!DOCTYPE html>
<html>
<head>
<style>
/* Styles Go Here */
</style>
</head>
<body>
<?php
echo 'Whatever';
?>
</body>
</html>
Also remember, you did not need to echo HTML using php, simply separate them out like this
<table>
<tr>
<td><?php echo 'Blah'; ?></td>
</tr>
</table>