Ranking of a webpage depends on the following factors ( not always in the order they are listed ):-
A. PageRank
PageRank of the page
B. BackLink
Number of backlinks that points to that page
PageRank of the backlinks
C. Keyword
Keywords present in the content of the page (e.g. if someone is looking for 'Love', how many times 'Love' occurs in the page)
Supporting keywords present in the content of the page (e.g. if someone is looking for 'Love', how many times 'Affair', 'Like' etc. occurs in the page)
Keywords present in the Title of the page
Keywords present in the URL of the page
Keywords present in the Meta Description of the page
H1 Tag: Keywords present in the H1 tag of the page. This tag is the headline of the page that users see.
Keywords and supporting keywords distributed across the page through other H tags, e.g. h1, h2 etc.
ALT Tag: Keywords present in the image ALT tag of the page.
Keywords present in the Meta Keyword of the page
D. Anchor Tags
Inbound Links: Keywords or phrase used as hyperlink within the website, even the same page, that points to that page.
Outbound Links: Keywords or phrase used as hyperlink used to point some other webpage of different website of the same niche.
E. Visitor's Behavior (Can be found through Google Analytics)
Time Spent: How long visitors are staying on a page. The more the better.
Bounce Rate: How many different inbound links visitors are traversing. Shows the importance of the site for a certain niche.
Link Juice: Whether visitors are following the page's outbound links. Shows the relevancy of the page's link juice and ensures the links are not paid.
Visitor's Loyalty: How often a visitor comes back to the page. Yes, Google is tracking your internet behavior through its cookie.
Unique Visitors: Whether the unique visitors have a steady growth to the page. Shows the site is gaining popularity.
Page Views: Whether Page View graph is better than the Unique Visitor graph. It shows the unique visitors found the content relevant and hence visited different pages of the site for more information.
Geo Location: Google delivers different SERP (Search Engine Result Page) at different geographical locations. The user behavior of a certain geographical location will boost the search engine ranking for that location.
F. URL and Domain Name
Age of the domain name of the site. The more the better.
A short URL is given more important than a long one. (e.g. http://www.example.com/short-url.php is better than http://www.example.com/community/viewtopic.php?f=46&t=2115788)
Closer the page towards the root domain, better it is. (e.g. http://www.example.com/short-url.php is better than http://www.example.com/sub-directory/long-url.php)
A root domain works better than the sub-domain. (e.g. http://upalc.com is better than http://demo.upalc.com)