Little Franklin Delano Roosevelt sits primly on a stool, his white skirt spread smoothly over his lap, his hands clasping a hat trimmed with a marabou feather. Shoulder-length hair and patent leather party shoes complete the ensemble.

We find the look unsettling today, yet social convention of 1884, when FDR was photographed at age 2 1/2, dictated that boys wore dresses until age 6 or 7, also the time of their first haircut. Franklin’s outfit was considered gender-neutral.

But nowadays people just have to know the sex of a baby or young child at first glance, says Jo B. Paoletti, a historian at the University of Maryland and author of Pink and Blue: Telling the Girls From the Boys in America, to be published later this year. Thus we see, for example, a pink headband encircling the bald head of an infant girl.

Why have young children’s clothing styles changed so dramatically? How did we end up with two “teams”—boys in blue and girls in pink?

“It’s really a story of what happened to neutral clothing,” says Paoletti, who has explored the meaning of children’s clothing for 30 years. For centuries, she says, children wore dainty white dresses up to age 6. “What was once a matter of practicality—you dress your baby in white dresses and diapers; white cotton can be bleached—became a matter of ‘Oh my God, if I dress my baby in the wrong thing, they’ll grow up perverted,’ ” Paoletti says.

The march toward gender-specific clothes was neither linear nor rapid. Pink and blue arrived, along with other pastels, as colors for babies in the mid-19th century, yet the two colors were not promoted as gender signifiers until just before World War I—and even then, it took time for popular culture to sort things out.

For example, a June 1918 article from the trade publication Earnshaw's Infants' Department said, “The generally accepted rule is pink for the boys, and blue for the girls. The reason is that pink, being a more decided and stronger color, is more suitable for the boy, while blue, which is more delicate and dainty, is prettier for the girl.” Other sources said blue was flattering for blonds, pink for brunettes; or blue was for blue-eyed babies, pink for brown-eyed babies, according to Paoletti.

In 1927, Time magazine printed a chart showing sex-appropriate colors for girls and boys according to leading U.S. stores. In Boston, Filene’s told parents to dress boys in pink. So did Best & Co. in New York City, Halle’s in Cleveland and Marshall Field in Chicago.

Today’s color dictate wasn’t established until the 1940s, as a result of Americans’ preferences as interpreted by manufacturers and retailers. “It could have gone the other way,” Paoletti says.

So the baby boomers were raised in gender-specific clothing. Boys dressed like their fathers, girls like their mothers. Girls had to wear dresses to school, though unadorned styles and tomboy play clothes were acceptable.

When the women’s liberation movement arrived in the mid-1960s, with its anti-feminine, anti-fashion message, the unisex look became the rage—but completely reversed from the time of young Franklin Roosevelt. Now young girls were dressing in masculine—or at least unfeminine—styles, devoid of gender hints. Paoletti found that in the 1970s, the Sears, Roebuck catalog pictured no pink toddler clothing for two years.

“One of the ways [feminists] thought that girls were kind of lured into subservient roles as women is through clothing,” says Paoletti. “ ‘If we dress our girls more like boys and less like frilly little girls . . . they are going to have more options and feel freer to be active.’ ”

John Money, a sexual identity researcher at Johns Hopkins Hospital in Baltimore, argued that gender was primarily learned through social and environmental cues. “This was one of the drivers back in the ’70s of the argument that it’s ‘nurture not nature,’ ” Paoletti says.

Gender-neutral clothing remained popular until about 1985. Paoletti remembers that year distinctly because it was between the births of her children, a girl in ’82 and a boy in ’86. “All of a sudden it wasn’t just a blue overall; it was a blue overall with a teddy bear holding a football,” she says. Disposable diapers were manufactured in pink and blue.

Prenatal testing was a big reason for the change. Expectant parents learned the sex of their unborn baby and then went shopping for “girl” or “boy” merchandise. (“The more you individualize clothing, the more you can sell,” Paoletti says.) The pink fad spread from sleepers and crib sheets to big-ticket items such as strollers, car seats and riding toys. Affluent parents could conceivably decorate for baby No. 1, a girl, and start all over when the next child was a boy.

Some young mothers who grew up in the 1980s deprived of pinks, lace, long hair and Barbies, Paoletti suggests, rejected the unisex look for their own daughters. “Even if they are still feminists, they are perceiving those things in a different light than the baby boomer feminists did,” she says. “They think even if they want their girl to be a surgeon, there’s nothing wrong if she is a very feminine surgeon.”

Another important factor has been the rise of consumerism among children in recent decades. According to child development experts, children are just becoming conscious of their gender between ages 3 and 4, and they do not realize it’s permanent until age 6 or 7. At the same time, however, they are the subjects of sophisticated and pervasive advertising that tends to reinforce social conventions. “So they think, for example, that what makes someone female is having long hair and a dress,’’ says Paoletti. “They are so interested—and they are so adamant in their likes and dislikes.”

In researching and writing her book, Paoletti says, she kept thinking about the parents of children who don’t conform to gender roles: Should they dress their children to conform, or allow them to express themselves in their dress? “One thing I can say now is that I’m not real keen on the gender binary—the idea that you have very masculine and very feminine things. The loss of neutral clothing is something that people should think more about. And there is a growing demand for neutral clothing for babies and toddlers now, too.”

“There is a whole community out there of parents and kids who are struggling with ‘My son really doesn’t want to wear boy clothes, prefers to wear girl clothes.’ ” She hopes one audience for her book will be people who study gender clinically. The fashion world may have divided children into pink and blue, but in the world of real individuals, not all is black and white.

Correction: An earlier version of this story misattributed the 1918 quotation about pink and blue clothes to the Ladies’ Home Journal. It appeared in the June 1918 issue of Earnshaw's Infants’ Department, a trade publication.