How To Add CSS Style To PHP Code
In this Post , i will show you several ways on how to CSS Style to PHP Code
First Solution
(1) Create a Separate CSS file
(2) Call the CSS File inside the PHP Code
Separate Style Sheet
p{ color:blue; }
PHP File
// Call the File <style><?php include 'C:/xampp/htdocs/echostyle.css'; ?></style> <?php echo' My Name Is '.'jame'; ?>
Second Solution
(1) Embed the Style tag outside php scope
<style> p{ color:blue; } </style> <?php // Echoing using single Quote echo'<p>My Name Is </p>'.'jame'; ?>
Third Solution
(1) Use Inline CSS inside PHP
<?php // Echoing using single Quote echo'<p style="color:blue;">My Name Is </p>'.'jame'; ?>
Leave a Reply