CSS is not reflected in php page although after link between Head Tags

My CSS is not reflected in the PHP page. I am using Xampp server. The display.css file is only in my htdocs folder. Let me know where I am doing wrong.

    <?php
Php Code
    ?>
    <html>
    </head>
    <link rel="stylesheet" type="text/css" src="display.css" />
    <title>E-Library Display Section</title>
    </head>
    <center><h1>Books Available for Free Download</h1></center>
    <body>
                <div class="wrapper">
                <div class="table">
                <div class="row header">
                        <div class="cell"><Book Name</div>
                        <div class="cell">Book Description</div>
                        <div class="cell">Book Author</div>
                        <div class="cell">Book Language</div>
                        <div class="cell">Download Link</div>
                        <div class="cell">Uploader Name</div>
                        <div class="cell">Uploader Email</div>
                    </div>  
                        <tr>
                            <?php
                                while($row = $result->fetch_assoc()) {
                                echo "<tr>";
                                echo "<td>".$row['bookname']."</td>";
                                echo "<td>".$row['bookdesc']."</td>";
                                echo "<td>".$row['bookauthor']."</td>";
                            ?>
    </body>
    </html>

      

+3


source to share


1 answer


In your stylesheet, change src to href.

<link rel="stylesheet" type="text/css" href="display.css" />

      



Also, you have two closed tags </head>

and not public ones, but not causing problems.

+4


source







All Articles