
47 Wn.2d 699 (1955)
289 P.2d 335
WILLIAM A. SHELDON, Respondent,
v.
ANN SHELDON, Appellant.[1]
No. 33301.
The Supreme Court of Washington, Department Two.
November 3, 1955.
*700 James G. Smith, for appellant.
Hammack & Fowler and George E. McIntosh, for respondent.
ROSELLINI, J.
The plaintiff husband instituted this divorce suit on October 4, 1954, alleging that the defendant had been guilty of personal indignities rendering life burdensome for him, in that she had associated improperly with other men and kept late hours, which she had refused to explain; that she had assumed an attitude of cold and studied indifference toward him and had told him, in the presence of others, that she no longer loved him, and had suggested that he leave the family home, which he did on September 29, 1954. He further alleged:
"That although the defendant has been guilty of the matters and things alleged in the preceding paragraph she has at all times exhibited love and affection towards her children [Kim William, two years of age, and Patrick Arthur, eight months of age] and has taken good care of them at all times and the Plaintiff believes and therefore alleges that it would be for the best welfare of the children to allow the said children to remain in the care, custody and control of the Defendant for the present or until such time as the Defendant has indicated or exhibited a change of attitude towards the said children subject however to the right of the Plaintiff to visit the said children regularly and have them with him on occasions."
The plaintiff alleged his ability and willingness to pay the sum of fifty dollars per month for the support of each of the children. In his prayer for relief, he asked that custody of the children be awarded to the defendant and that he, the plaintiff, be required to pay the said sum for their support.
Subsequent to the filing of the complaint, the parties entered into a property settlement agreement, wherein it was agreed that the defendant was to have the custody of the minor children and that the plaintiff would pay the sum of fifty dollars per month for the support of each of the children. This agreement was filed in the divorce action.
The defendant having defaulted, and an order of default having been entered, the matter was heard on January 13, *701 1955. The defendant's testimony followed the allegations of his complaint. In regard to his wife's misconduct, he testified:
"Well, sir, I mean my wife would go out and with intention of going to a show or some such thing as that and would have friends that she would meet and go out with them, and there was no particular one; there were several."
He further testified that she kept rather late hours and refused to explain where she had been; that as a result he had lost all love and affection for her and could no longer live with her as her husband.
In regard to her fitness as a mother, he testified:
"The woman has never mistreated the children. She has taken excellent care of them and her conduct toward me and as a wife is not so; toward the children she has been a very good mother."
After asking the plaintiff if the allegations in the complaint regarding the defendant's improper association with other men were true, and upon receiving an affirmative answer, the court expressed its opinion that the testimony as to the defendant's fitness as a mother was inconsistent with the testimony regarding her improper conduct. Therefore, the court said, it would not make a finding that she was a fit and proper person to have the custody of the children. The plaintiff was asked if he was willing to take the children and whether he could provide a home for them. He stated that his mother lived in Mt. Vernon and could take the children.
Upon a finding that the defendant had been guilty of the "matters and things" alleged in the complaint and was therefore an unfit person to have the care and custody of the minor children of the parties, a decree was entered granting the plaintiff a divorce and awarding him custody of the children. Consequently, no provision was made for payments for their support.
After the decree was entered, the defendant appeared and prosecuted this appeal. Her assignments of error raise one question which is determinative of the case: Can the superior *702 court in a default divorce proceeding make findings of fact and provisions for the custody of the minor children of the parties contrary to the allegations and prayer of the complaint, without notice to the defendant of its proposed action?
[1] A judgment entered without notice and an opportunity to be heard is void. State ex rel. Adams v. Superior Court, 36 Wn. (2d) 868, 220 P. (2d) 1081 (1950); State ex rel. First Nat. Bank v. Hastings, 120 Wash. 283, 207 Pac. 23 (1922).
In the latter case, we said:
"It is elementary law that a default judgment cannot award any relief beyond that which the facts alleged in the complaint in the action show the plaintiff legally entitled to. This also means, of course, that if a complaint wholly fails to state facts legally entitling the plaintiff to any recovery or states facts affirmatively showing that the plaintiff has no right of recovery, ... a default judgment rendered thereon is void, just as such a default judgment would be void in so far as it awarded relief beyond that which the allegations of the complaint showed the plaintiff legally entitled to."
In State ex rel. Adams v. Superior Court, supra, referring to Rem. Rev. Stat., § 988, and Rem. Supp. 1947, § 988, which pertained to the court's duty to award alimony, divide property, and provide for the custody and support of the children, this court said:
"If it was meant by the statute that the court might divide property, or order the payment of alimony, or provide for the care, support, and education of children in addition to the content of the complaint and its prayer when a defendant has not appeared and is in default, it would run counter to the due process clause of the constitution above referred to, and we therefore cannot adopt any such construction of the statute. The statute applies to the subject matter brought before the court by the complaint, or as the complaint may be amended if a general appearance has been made by the defendant by an answer."
We held in that case that the superior court was without power to award alimony to the plaintiff wife, where, in her complaint, she had neither alleged her need and the defendant's *703 ability to pay nor prayed for such relief, and the defendant had not appeared. The statutes construed in that case have been superseded by Rem. Supp. 1949, § 997-11 (RCW 26.08.110), which imposes substantially the same duties upon the superior court.
The plaintiff insists that the Adams case is not controlling here; that it applies only where the court has made an award of property contrary to the allegations and prayer of the complaint, and that the court, having inherent power to provide for the custody of the children of divorced parents according to the requirements of their best welfare, is not limited by the allegations or the prayer of the complaint. He further contends that parents have no custodial rights which are protected by the due process clauses of the state and Federal constitutions, and that consequently the court may deprive either or both of them of custody of their children without notice and an opportunity to be heard.
[2-4] While it is true that the court is free to inquire into all matters pertaining to the welfare of the children and to determine who is best able to provide them with wholesome and proper environment, the contention that a parent is not entitled to notice of the court's proposed action is untenable. It is true, as the plaintiff points out, that children are not property; nevertheless, the right of a parent to the custody of his child, subject to the power of the court to protect the child's welfare, is fundamental in our concept of a free society. For a discussion of the reasons why parents' custodial rights are protected by due process, see Lacher v. Venus, 177 Wis. 558, 188 N.W. 613, 24 A.L.R. 403 (1922).
By observing the basic requirements of due process, the court protects not only the interests of the parent, but also those of the child which are always of paramount importance.
[5, 6] A defendant has a right to allow a default to be taken against him, secure in the knowledge that the judgment or decree will not exceed the demand of the complaint. Ermey v. Ermey, 18 Wn. (2d) 544, 139 P. (2d) 1016 (1943), cited in State ex rel. Adams v. Superior court, supra. The plaintiff alleged in his complaint that the defendant was a *704 fit and proper person to have the care and custody of the minor children and asked that their custody be awarded to her. He expressed his willingness to pay a reasonable sum for their support. While he alleged that the defendant's associations with other men were improper, he did not accuse her of immorality, and she had no notice that an issue as to her fitness would arise. Nevertheless, the court was empowered to question her fitness, regardless of the limitations of the pleadings. It erred, however, when it granted the plaintiff additional relief without first giving the defendant notice of its proposed action and an opportunity to appear and defend her right to the children's custody.
The judgment is reversed, and remanded with instructions to enter findings and decree within the allegations and prayer of the complaint, or, in the alternative, to retry the matters of custody of the children and provisions for their support, after notice to both parties, affording them an opportunity to be heard.
HAMLEY, C.J., MALLERY, HILL, and WEAVER, JJ., concur.
NOTES
[1]  Reported in 289 P. (2d) 335.
