tags:

views:

126

answers:

1

How can we go about making some of the words in a sentence appear in BOLD

for example - I'm trying to put one of the words of a sentence in BOLD i.e.

sentence is "please select the amount"

amount should be in BOLD, and now, when I use

message = "please select the <b>amount </b>" 

This doesn't work. It simply shows

please select the <b>amount </b>.

How can I get this to work?

+5  A: 

Setting the escape attribute to false allows you to insert html tags

<h:outputText escape="false" value="please select the <b>amount</b>"/>
stacker
I'd suggest `<strong>`
Bozho
And keep XSS risks in mind. Never do this for user-controlled input.
BalusC
Thanks alot....
@karansardana You're welcome, you should also mark your question as answered to indicate that the answer was correct. (The checkmark below the up and downvote buttons.)
stacker