• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

How to set color and size in echo PHP command?

How do I increse letter size and change color to red in the following command?
echo"<h8>Please check the requeire fields</h8>" ;

Open in new window

0
DLJB
Asked:
DLJB
  • 2
  • 2
1 Solution
 
Britt ThompsonSr. Systems EngineerCommented:
there's a couple of different ways:

//USING HTML
<h8><font color="red" size="+2">Please check the requeire fields</font></h8>

//USING CSS
<h8 style="color:red; font-size:20px;" >Please check the requeire fields</h8>
0
 
DLJBAuthor Commented:
I did
echo"<h8><font color="red" size="+2">Please check the requeire fields</font></h8>" ;

Im receiving  syntax error.
Whats wrong?
0
 
Britt ThompsonSr. Systems EngineerCommented:
You need a space between the echo and parentheses. Also, my fault you need to use single quotes within the double quotes:

echo "<h8><font color='red' size='+2'>Please check the requeire fields</font></h8>";
0
 
DLJBAuthor Commented:
Thanks!
It works fine.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now