I've made a sample code as below code to dynamically create pages using php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<style type="text/css">
div {
width: 200px;
height: 200px;
margin: 0 auto;
background-color: black;
color: white;
}
</style>
</head>
<body>
<?php
echo '<div>' . '<p>' . 'generated by php' . '</div>';
?>
</body>
</html>
Then I decided to use an external css file and refer to it by using the LINK tag in the head tag And no styles were applied to the DIV generated. What I did at last was putting the LINK tag anywhere after the PHP code and voila... it worked perfectly. Is there any restrictions about where to put a link tag or not?