+ Start a Discussion
Andrea BrumanAndrea Bruman 

I need to bold one word in a sentence in an outputLabel value on a Visualforce page. How do I do this?

I am trying to bold the word "eligible".
So far I have this:
<apex:pageBlockSection title="S Assistance" columns="1">
<apex:outputLabel value="They would like to give eligible requirements, etc."/>
<apex:outputField value="{!app.S_Assistance_Requested__c}" />
</apex:pageBlockSection>

I've tried this:
<apex:pageBlockSection title="S Assistance" columns="1">
<apex:outputLabel value="They would like to give <b>eligible</b> requirements, etc."/>
<apex:outputField value="{!app.S_Assistance_Requested__c}" />
</apex:pageBlockSection>

Not sure how to do this.  Please assist.
 
Best Answer chosen by Andrea Bruman
Raj VakatiRaj Vakati
Change it as bleow .. set escape="false"​ 
 
<apex:outputLabel escape="false" value="They would like to give <b>eligible</b> requirements, etc."> </apex:outputLabel>

 

All Answers

Raj VakatiRaj Vakati
Change it as bleow .. set escape="false"​ 
 
<apex:outputLabel escape="false" value="They would like to give <b>eligible</b> requirements, etc."> </apex:outputLabel>

 
This was selected as the best answer
Raj VakatiRaj Vakati
This is the complete code
 
<apex:pageBlockSection title="S Assistance" columns="1">
<apex:outputLabel escape="false" value="They would like to give <b>eligible</b> requirements, etc."/>
<apex:outputField value="{!app.S_Assistance_Requested__c}" />
</apex:pageBlockSection>

 
Andrea BrumanAndrea Bruman
Thanks, I had a couple of spots to do this for the same words.  It worked!  Thanks a bunch.
Erin Page 4Erin Page 4
It looks like styling on label doesn't work appropriately once there's an inputField or inputText in the same pageBlockSectionItem.  I ended up using <big></big> instead of <b></b> and this worked well enough.
https://www.mobdro.guide/