How to set color and size in echo PHP command?

Posted on 2009-04-27
Last Modified: 2012-05-06
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

Question by:DLJB
    LVL 30

    Expert Comment

    there's a couple of different ways:

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

    <h8 style="color:red; font-size:20px;" >Please check the requeire fields</h8>

    Author Comment

    I did
    echo"<h8><font color="red" size="+2">Please check the requeire fields</font></h8>" ;

    Im receiving  syntax error.
    Whats wrong?
    LVL 30

    Accepted Solution

    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>";

    Author Closing Comment

    It works fine.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    This article was inspired by a question here at Experts Exchange ( The requirements stated in that question are (1) reduce the file size of a large number of…
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    This video discusses moving either the default database or any database to a new volume.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now