I am new to salesforce platform, i am solving trailhead challenges i came across the error .solve this error
error:
<apex:component>
is required and must be the outermost tag in the markup at line 1 column 1
REF:https://trailhead.salesforce.com/visualforce_fundamentals/visualforce_output_components
MYCODE:
<apex:page standardController="Opportunity">
<apex:pageBlock title="opportunities list">
<apex:pageBlockSection title="opportunities main">
<apex:column value ="{!Opportunity.Name}"/>
<apex:column value ="{!Opportunity.Amount}"/>
<apex:column value ="{!Opportunity.Close Date}"/>
<apex:column value ="{!Opportunity.account.name}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Best Answer
Trailhead module is requesting you use apex:outputField components.
Code should look something like this: