
954 So.2d 893 (2007)
STONEBRIDGE DEVELOPMENT, LLC, Plaintiff-Appellee,
v.
STONEBRIDGE ENTERPRISES, LLC, Defendant-Appellant.
No. 42,039-CA.
Court of Appeal of Louisiana, Second Circuit.
April 4, 2007.
*894 Randy P. Zinna, Baton Rouge, for Appellant.
R. Lane Pittard, Benton, for Appellee.
Before GASKINS, CARAWAY and MOORE, JJ.
MOORE, J.
The defendant, Stonebridge Enterprises, LLC, appeals a judgment on the pleadings recognizing the plaintiff, Stonebridge Development, LLC, as the owner of a 2.92-acre tract of land in Bossier Parish and ordering the defendant to surrender possession of the property. We affirm.

Procedural Background
Stonebridge Development filed this suit in April 2006 alleging that it was the owner of the tract, which was described by metes and bounds,[1] but that Stonebridge Enterprises was in possession of a portion of the tract and had refused to surrender possession to the plaintiff. The petition prayed for judgment recognizing the plaintiff as legal owner of the property and ordering the defendant to surrender possession of it.
Stonebridge Enterprises answered, admitting each of the petition's allegations: that the plaintiff owned the tract, that the defendant was in possession of a portion of it, and that the defendant had refused to surrender possession. The answer contained no further factual allegations and merely prayed for judgment in favor of the defendant, rejecting the plaintiff's demands.
The plaintiff then moved for judgment on the pleadings, urging that the defendant had admitted each factual allegation necessary for a judgment in a petitory action, La. C.C.P. art. 3653. By memorandum only, the defendant argued that any issue involving improvements on the tract was beyond the scope of the pleadings. The defendant explained that it did not contest the plaintiff's title to the tract itself, but that the defendant owned the maintenance building situated thereon, and would oppose the petition only to the extent the plaintiff was trying to evict the defendant from its building.
At a hearing in July 2006, the court found that every allegation of the plaintiff's petition had been admitted by the defendant and that the issue of the building arose only in memorandum instead of by pleading. The court noted that it could not discern anything about the building, including who built it, when or where; the court therefore found that judgment on the pleadings was proper. The court rendered judgment recognizing the plaintiff as the legal owner of the property, using the same metes and bounds recited in the petition, and ordering the defendant to "immediately surrender its possession to *895 any and all portions of the above described property" to the plaintiff.
The defendant appealed, urging three specifications of error:
1. The trial court erred in granting plaintiff's motion for judgment on the pleadings on any issue other than the ownership of the tract of land described in paragraph two of plaintiff's petition.
2. The trial court erred in ordering defendant to surrender possession of the building and other improvements located on the tract of land because the pleadings did not address or allege ownership of any property other than the tract of land.
3. The trial court erred in ordering defendant to surrender possession of the building and other improvements located on the tract of land because defendant's answers specifically rejected and denied plaintiff's demand to surrender possession.

Discussion
The motion for judgment on the pleadings is regulated by La. C.C.P. art. 965, which provides (with emphasis added):
Any party may move for judgment on the pleadings after the answer has been filed, or if an incidental demand has been instituted after the answer thereto had been filed, but within such time as not to delay the trial. For the purpose of this motion, all allegations of fact in mover's pleadings not denied by the adverse party or by effect of law, and all allegations of fact in the adverse party's pleadings shall be considered true.

A motion for judgment on the pleadings presents solely a question of law. Gibbens v. Wendy's Foods Inc., 31,487 (La. App. 2 Cir. 1/20/99), 729 So.2d 629. The jurisprudence favors giving a party his day in court; hence, judgment on the pleading is granted only when the legal right is clearly established. Canal Motors Inc. v. Campbell, 241 So.2d 5 (La.App. 4 Cir. 1970). However, when the plaintiff's allegations clearly establish a right to relief, and the defendant admits each allegation, judgment on the pleadings is proper. Connette v. Wright, 149 La. 478, 89 So. 626 (1921).
The defendant argues, as it did in the district court, that it does not contest the plaintiff's ownership of the land described in the petition, but rather the plaintiff's ownership of the building and other improvements permanently attached thereto. According to the defendant, the petition does not specifically address the building and other improvements, and these items are separate immovables under La. C.C. art. 464. The defendant submits that any issue regarding the building and improvements is beyond the scope of the pleadings and could not be decided by judgment on the pleadings.
The defendant's position is unpersuasive. The suit is a petitory action, which is defined by La. C.C.P. art. 3651:
The petitory action is one brought by a person who claims the ownership, but who is not in possession, of immovable property or of a right therein, against another who is in possession or who claims the ownership thereof adversely, to obtain judgment recognizing the plaintiff's ownership.
In accordance with this principle, the plaintiff alleged that it was the owner of the property but that the defendant was in possession of a portion thereof. The defendant admitted that the plaintiff owned it and that the defendant was not possessing it as owner. These admissions satisfied every requirement for a judgment recognizing the plaintiff as the owner and *896 giving it possession of the property. La. C.C.P. art. 3651. The plaintiff was clearly entitled to a judgment on the pleadings. Connette v. Wright, supra.
Contrary to the defendant's position, any buildings or improvements on land are not presumptively separate immovables. "Tracts of land, with their component parts, are immovables." La. C.C. art. 462. "Buildings, other constructions permanently attached to the ground * * * are component parts of a tract of land when they belong to the owner of the ground." La. C.C. art. 463. "Things incorporated in or attached to an immovable so as to become its component parts belong to the owner of the immovable." La. C.C. art. 493.1. In short, buildings are presumed to belong to the owner of the soil. Marcellous v. David, 252 So.2d 178 (La.App. 3 Cir.), writ refused, 259 La. 943, 253 So.2d 383 (1971). The law does not require a three-dimensional property description for tracts of land with buildings. If the defendant wished to assert separate ownership of alleged building and improvements, it did not accomplish this by simply admitting each of the plaintiff's allegations.
Finally, we note that even though the defendant admitted each of the plaintiff's allegations, the prayer for relief sought judgment in favor of the defendant, rejecting the plaintiff's demands. This court is cognizant of older jurisprudence holding that the character of a pleading is determined by the prayer for relief rather than by the allegations therein. See, e.g., Garnier v. Louisiana Milk Comm'n, 200 La. 594, 8 So.2d 611 (1942). However, the Code of Civil Procedure now espouses the theory of fact pleading, whereby a party may receive any relief to which he is entitled under the factual pleadings and evidence. Cox v. W.M. Heroman & Co., 298 So.2d 848 (La.1974).[2] It would be incongruous to grant relief not warranted by the pleadings, solely on the basis of a non sequitur prayer. The defendant's specifications of error lack merit.

Conclusion
For the reasons expressed, the judgment on the pleadings is affirmed, recognizing Stonebridge Development, LLC as the legal owner of the property described in the appendix to this opinion and ordering Stonebridge Enterprises, LLC to surrender possession of any and all portions of it to the plaintiff. All costs are to be paid by the defendant, Stonebridge Enterprises, LLC.
AFFIRMED.

APPENDIX
A tract of land located in the Northwest Quarter of Section 12, Township 18 North, Range 13 West, Bossier Parish, Louisiana. Said tract more fully described as follows:
From the Northwest Corner of Section 12, Township 18 North, Range 13 West, Bossier Parish, Louisiana, run S 00°41'26" W a distance of 2,640.48 feet to a found one-half inch iron pipe, thence S 87°40'30" E a distance of 914.52 feet to a set one-half inch rod. Said point being the point of beginning for the tract herein described.
Thence N 19°22'06" W a distance of 200.00 feet,
Thence N 66°04'15" E a distance of 412.94 feet,
Thence S 21°54'36" E a distance of 399.47 feet,
*897 Thence S 66°14'21" W a distance of 16.48 feet,
Thence N 87°17'19" W a distance of 445.60 feet back to the point of beginning.
Said tract containing 2.92 acres.
Also described as:
Begin at a pt in the center of the race track bayou 2640 ft S & 926 ft S 88 deg 08 min E from the NW cor of Sec 12, thence N 22 deg 59 min W with the centerline of said bayou 200 ft, thence N 65 deg E 411.5 ft, thence S 23 deg E 402 ft, thence S 65 deg W 18 ft, thence N 88 deg 08 min W 445.6 ft to the pt of beg sec 12, T 18, R 13, Tract 1A2B4.
NOTES
[1]  The description is included as an appendix to this opinion.
[2]  Overruled on other grounds in A. Copeland Enterprises Inc. v. Slidell Memorial Hosp., 94-2011 (La.6/30/95), 657 So.2d 1292.
