Activity Forums Salesforce® Discussions Is it necessary to use Apex Tags while constructing a Salesforce Visualforce page?

  • shradha jain

    Member
    August 6, 2018 at 7:17 am

    Hello anurag,

    No,it is not necessary to use apex tags while constructing visualforce page.You can use HTML tags instead but it is compulsory to use <apex:page>tag.You can write HTML inside <apex:page>tag.You can refer the following example:

    <apex:page showHeader="false" standardStylesheets="false" sidebar="false">
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    <p>This is a test.</p>
    </body>
    </html>
    </apex:page>

  • Parul

    Member
    September 7, 2018 at 5:25 pm

    No,  it's not necessary you can use HTML tags instead of apex tag while constructing but it is compulsory to use HTML tags inside <apex:page>tag.

    For example:

    <apex:page showHeader="false" standardStylesheets="false" sidebar="false">
    <apex:form>
    <h1>Show/Hide HTML form Visualforce Example</h1>

    <head>
    <title>Test</title>
    </head>
    <div>
    This content will not be toggled.
    </div>
    <apex:commandbutton value="Save Content" action="{!Save}"></apex:commandbutton>
    </apex:form>
    </apex:page>

     

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos