
298 S.W.2d 285 (1957)
Ex parte Wilda Laurie YELTON.
No. 6103.
Court of Civil Appeals of Texas, Beaumont.
January 24, 1957.
Baldwin & Goodwin, Beaumont, for appellant.
Ramie Griffin, Dist. Atty., W. T. McDaniel, Probation Officer, Beaumont, for appellee.
*286 ANDERSON, Justice.
On February 15, 1956, in the Juvenile Court of Jefferson County, Wilda Laurie Yelton was adjudged to be a delinquent child. The judgment was not appealed from and became final. After being on probation for a time, Miss Yelton was ordered committed to the care, custody and control of the Texas State Youth Development Council and was placed in the State School for Girls at Gainesville, Texas. On October 11, 1956, application was made on her behalf for a writ of habeas corpus. The application was made to the judge of the district court that was discharging the functions of a juvenile court when the aforesaid judgment was rendered. The writ issued and hearing was had on it October 19, 1956. At the conclusion of the hearing, Miss Yelton was remanded to the custody of the respondent, the superintendent of the aforesaid school for girls. This appeal was perfected from that order or judgment.
All legal steps against Miss Yelton that preceded the application for writ of habeas corpus were taken under authority of Article 2338-1, Vernon's Texas Civil Statutes, Acts 1943, 48th Leg., p. 313, ch. 204, as amended. The proceedings were civil, not criminal, in nature, therefore. Dendy v. Wilson, 142 Tex. 460, 179 S.W.2d 269, 151 A.L.R. 1217; Lazaros v. State, Tex.Civ.App., 228 S.W.2d 972, 975. And since habeas corpus proceedings that grow out of civil actions are themselves treated as civil actions that are appealable to our Courts of Civil Appeals, Harbison v. McMurray, 138 Tex. 192, 158 S.W.2d 284, we have no doubt that the court has jurisdiction of the present appeal.
It is well established that the writ of habeas corpus is not permitted as a substitute for an appeal. Mozingo v. Mitchell, Tex.Civ.App., 220 S.W.2d 900; Lazaros v. State, Tex.Civ.App., 228 S.W.2d 972. It is equally well settled that when a judgment is attacked through the medium of a writ of habeas corpus, the attack is a collateral attack and can prevail only if the judgment is void. Lazaros v. State, supra, and the cases therein cited. Counsel for appellant recognize these established principles but argue that in this instance the original judgment by which Miss Yelton was adjudged to be a delinquent child shows on its face that it is void. We have concluded that the contention is sound.
The body of the judgment to which we have just referred is as follows:
"A petition filed the 15th day of February, A.D. 1956, alleging that Wilda Laurie Yelton, a juvenile born on the 13th day of October, A.D. 1942, did in the County of Jefferson, State of Texas, towit:
"That on or about the 12th day of February, A.D. 1956, Wilda Laurie Yelton did then and there unlawfully wander about the streets of Beaumont, Jefferson County, Texas, without being on any business or occupation against the peace and dignity of the state.
"Whereas, on this, the 18th day of February, 1956, came on to be heard before the Honorable Owen M. Lord, Judge, Criminal District Court of Jefferson County, Texas, sitting as a Juvenile Court, the above case, in which the petition alleges the above act on the part of said child Wilda Laurie Yelton, tending to constitute said child a delinquent child, when said child was brought into court, with W. T. McDaniel, Chief Probation Officer, Jefferson County, Texas, appointed by the court to represent said child, and a trial by jury was waived  and, the court after hearing said petition read, and the evidence submitted returned the following verdict:

"`Guity'
"It is, therefore, adjudged that said child is now under 17 years of age and that the facts above set out and alleged are true, and therefore, said child is hereby adjudged to be a delinquent child, which *287 fact demands the interposition of the State of Texas in her behalf, and that she become a ward of this court, subject to this and further orders of the court."
We think the judgment is not reasonably susceptible of any construction other than that Miss Yelton was adjudged to be a delinquent child for no reason except that she was found to have "unlawfully" wandered about the streets of Beaumont upon one occasion when neither business nor an occupation supplied a reason for her wanderings. Nor is it reasonably susceptible of any construction except that the conduct just mentioned was the only conduct charged in the pleadings in the case as a basis for a finding of delinquency. So construed, the judgment reflects on its face that the court was without legal authority to adjudge Miss Yelton delinquent.
The court had only such authority in the respect in question as Article 2338-1, V.T.C.S., supra, conferred upon it, and in section 3 of the statute a "delinquent child" is defined as follows:
"The term `delinquent child' means any female person over the age of ten (10) years and under the age of eighteen (18) years and any male person over the age of ten (10) years and under the age of seventeen (17) years:
"(a) who violates any penal law of this state of the grade of felony;
"(b) or who violates any penal law of this state of the grade of misdemeanor where the punishment prescribed for such offense may be by confinement in jail;
"(c) or who habitually violates any penal law of this state of the grade of misdemeanor where the punishment prescribed for such offense is by pecuniary fine only;
"(d) or who habitually violates any penal ordinance of a political subdivision of this state:
"(e) or who habitually violates a compulsory school attendance law of this state;
"(f) or who habitually so deports himself as to injure or endanger the morals or health of himself or others;
"(g) or who habitually associates with vicious and immoral persons."
The judgment reflects on its face that it was rendered on facts and evidence that did not constitute Miss Yelton a delinquent child within contemplation of the definition and, therefore, that it was and is without support in law. Despite the fact that it was alleged in the pleadings, and that the court apparently found, that Miss Yelton acted "unlawfully", we know of no state penal law that makes it an offense of any grade for a minor merely to wander about the streets of a city upon one occasion without having any business or occupation to justify his or her conduct. If there is an ordinance of the City of Beaumont that makes such conduct an offense, it is not reflected of record. Even assuming the existence of such an ordinance, however, the judgment nevertheless reflects that it was and is without basis in law. Where neither a felony nor a misdemeanor that is punishable by confinement in jail has been committed under state law, one becomes a delinquent child only by "habitually" doing one or more of the things designated in the statutory definition; and in this instance the judgment reflects that its basis is Miss Yelton's conduct upon but one occasion.
In so far as the basic principles of law and the basic facts involved are concerned, this case and that of Ex parte Douglas, 109 Tex.Cr.R. 463, 5 S.W.2d 153, 154, are strikingly similar, despite the fact that the latter arose under a different statute and dealt primarily with the pleadings, as distinguished from the facts, on which judgment was rendered. Because of the analogy, we quote from the Douglas case the following:
*288 "The information filed charged in part that relator was a delinquent child, in this, that she did `then and there unlawfully loiter on the public streets and refuse to obey her parents.' This is the only act charged against her. No such act is mentioned in article 1083, C.C.P., defining a delinquent child, and such an information could not be made the basis of a prosecution. Ex parte Roach, 87 Tex.Cr.R. 370, 221 S.W. 975.
"The court could not assume jurisdiction and enter a judgment of conviction against relator for an offense not defined by law and for an act which under the statute did not constitute her a delinquent child. Before a child can be deprived of parenthood and become a ward of the state, a situation lamentable in any case, the terms of the law must be strictly followed."
If the judgment were regular on its face, an entirely different situation would exist, but since it is void on its face, the judgment of the trial court is reversed and relator Wilda Laurie Yelton is ordered discharged.
