Salesforce Certified Platform Developer II — Question 120

A developer created a custom component to display an HTML table. The developer wants to be able to use the component on different Visualforce Pages and specify different header text for the table.
Which tag should the developer use inside the component?

Answer options

Correct answer: D

Explanation

The correct answer is <apex:attribute>, which allows the component to accept values from the parent page, such as custom header text. The other options, <apex:variable>, <apex:define>, and <apex:param>, do not provide the same functionality for passing attributes for use in the component.