Activity Forums Salesforce® Discussions What is the difference between outputLabel and outputText in Visualforce page in Salesforce?

  • What is the difference between outputLabel and outputText in Visualforce page in Salesforce?

    Posted by Pooja on January 23, 2020 at 2:15 pm

    What is the difference between outputLabel and outputText in Visualforce page in Salesforce?

    Shubham replied 4 years, 11 months ago 4 Members · 3 Replies
  • 3 Replies
  • Shweta

    Member
    January 23, 2020 at 2:29 pm

    <apex:outputLabel> : It Is a label for an input or output field . It  provides a label for a controller method that does not correspond to a field on a Salesforce object. This component  supports HTML pass-through attributes using the "html-" prefix. It  is associated with another component via "for" attribute.

    <apex:outputText> : It displays text on a visualforce page. Also it escape the rendered text if it contains HTML characters. It can be customized using CSS styles.

     

  • Deepak

    Member
    January 23, 2020 at 2:48 pm

    Hi Pooja,

    output label: It is used to display text on a Visualforce page.

    outputField: A read-only display of a label and value for a field on a Salesforce object.

  • Shubham

    Member
    January 23, 2020 at 2:49 pm

    Hi Pooja,

    apex:outputText: Displays text on a Visualforce page.

    apex:outputlabel tag is used to provide label or name to the controller method in visualforce page. Outputlabel tag renders an HTML “label” element to customize the appearance of the label using CSS labels.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos