Apex Page
An Apex Page (more commonly known as a Visualforce Page) is a page built using Visualforce markup that can include HTML, CSS, JavaScript, and Visualforce component tags.
Definition
An Apex Page (more commonly known as a Visualforce Page) is a page built using Visualforce markup that can include HTML, CSS, JavaScript, and Visualforce component tags. Apex Pages use a tag-based syntax similar to HTML and are rendered by the Salesforce platform. They can reference Apex controllers to display dynamic data and handle user interactions.
In plain English
“An Apex Page is another name for a Visualforce page. It's a page built with Salesforce's own markup language that looks kind of like HTML but has special tags for showing Salesforce data and calling code.”
Worked example
A developer at Allerton Software inherits a 2014-era Apex Page (Visualforce page) called CustomerSummary.page that displays Account data with a custom layout and a button that triggers an Apex method. The page is markup with apex:pageBlock, apex:repeat, and apex:commandButton tags, referencing a Custom Controller that runs SOQL queries and handles button clicks. Modern teams build the same UI as a Lightning Web Component, but the existing Apex Page still works - the migration to LWC is on the roadmap, not a fire drill. Apex Page is the older terminology; Visualforce Page is what the team actually says day-to-day.
Why Apex Page matters
Apex Page is the technical name for a Visualforce page in the Salesforce metadata model; in Setup you'll find them under 'Visualforce Pages' but the underlying metadata type is ApexPage. A page is written using a tag-based syntax that mixes standard HTML, CSS, JavaScript, and Visualforce-specific tags like apex:outputField, apex:inputText, and apex:commandButton. Pages can reference Apex controllers to display dynamic data, handle form submissions, and execute business logic on the server.
Visualforce was the primary UI framework in Salesforce for years before Lightning Web Components took over. Most new development today uses LWC, but Visualforce pages still run in Lightning Experience (rendered inside an iframe), and many orgs maintain a mix of legacy Visualforce and modern LWC code. Knowing how Apex Pages work is important for maintaining existing orgs even if new work is done in LWC.
How organizations use Apex Page
Maintains a suite of Visualforce pages that handle complex PDF generation using apex:page renderAs='pdf'. LWC doesn't have an equivalent built-in PDF rendering capability, so these Visualforce pages continue to serve that purpose.
Uses a Visualforce page embedded in a Lightning page to display a custom data entry wizard that was built before LWC was widely adopted. The page still works fine and hasn't been prioritized for rewrite because the business value of migrating is low.
Wrote a Visualforce page that renders an HTML-formatted email template with dynamic merge fields. The page is invoked from a custom button and generates a branded email preview before the user clicks send.
Trust & references
Straight from the source - Salesforce's reference material on Apex Page.
- apex:pageSalesforce Developers
- Standard Visualforce Component ReferenceSalesforce Developers
Test your knowledge
Q1. What is another name for an Apex Page?
Q2. What syntax does an Apex Page use?
Q3. What is the recommended modern alternative to Visualforce for new UI development?
Discussion
Loading discussion…