[SalesForce] salesforce trailhead TOPIC: Display Records,Fields and Tables

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:

<apex:page standardController="Opportunity">
    <apex:pageBlock title="opportunities list">
        <apex:pageBlockSection title="opportunities main" >
            <apex:outputField value="{! Opportunity.Name }"/>
            <apex:outputField value="{! Opportunity.Amount }"/>
            <apex:outputField value="{! Opportunity.CloseDate }"/>
            <apex:outputField value="{! Opportunity.Account.Name }"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>