+ 1

How to echo a colored or formatted text?

How to echo a colored or formatted text like we do in html using <font> tags

4th May 2017, 8:04 PM
Biregani
Biregani - avatar
2 Answers
+ 7
<?php echo "<font size='5' color='red' face='Arial'>П</font>" ?>
4th May 2017, 8:11 PM
shaldem
shaldem - avatar
+ 4
<font> element is deprecated in html5: use css instead... <?php echo '<span style="font-size:5px; font-family:Arial;">formated text</span>' ?> ... or even better practice to not inline css property but define some rules and target the element ( by use of class and/or id attributes ). Good practice is also to use the more semantical significant tag available, and use <span> and <div> as default generic else ( respectively for inlined or block type content box ).
4th May 2017, 9:14 PM
visph
visph - avatar