Changing color in java/jsp

Posted on 2012-09-19
Last Modified: 2012-10-15
Hi Experts,

I am wondering if there is a way to change color of the output of part of my string. for example I have this:

 <option style="font-size: 36px;"
                                  ; value="<%=applicationName + "," + createdDate%>">
                                 out.print(applicationName + "    Created: "                                                            + createdDate.substring(0, 10)
                                                            + "   Last Updated: "
                                                            + lastUpdated.substring(0, 10));
                  </option>can I have the the color of "created" to be different than the rest?

Question by:DESEI-SELB
    LVL 20

    Expert Comment

    by:chaitu chaitu
    try this.
    out.print(applicationName + "    <font color='red'>Created:</font> "                                                            + createdDate.substring(0, 10)
                                                                + "   Last Updated: "
                                                                + lastUpdated.substring(0, 10));

    Open in new window

    LVL 75

    Accepted Solution

    Poor suggestion
    Font is a deprecated tag and it does not work inside an option

    No you cannot change the colour or the font of a word in a normal dropdown.
    You will need to use a styled dropdown instead

    Author Closing Comment

    didnt try the styled dropdown. thanks.

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Suggested Solutions

    In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    754 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