SEOUL — Here in the heart of the world’s most plugged-in nation, President Obama spoke the language of the online generation Monday.

“In our digital age, we can connect and innovate across borders like never before — with your smart phones and Twitter and Me2Day and Kakao Talk,” Obama said during a speech at Hankuk University of Foreign Studies. Hundreds of South Korean students, sitting in bleachers in the college’s gymnasium, whooped delightedly at the presidential name-check of their country’s premier social media networks.

Obama often jokes about social media during his speeches in the United States, playing the butt of the gag as the 50-year-old fogey who doesn’t fully get it when, for instance, he instructs his audience to “tweet” their representatives in Congress in support of his jobs bill.

In Korea, Obama got the same laughs, but his shtick had a serious underlying message: The president was making a point that the South Korean youth are among the most technologically sophisticated and connected in the world — allowing him to draw a distinction with their impoverished, isolated counterparts across the North Korean border just 25 miles to the north of Seoul.

In his visit here for a nuclear security summit, Obama has sought to ratchet up international pressure on a Pyongyang regime that continues to bedevil and provoke the international community with its nuclear weapons program. And the images from the president’s first day here were largely reflective of the scary stakes at hand: Photos of him peering through binoculars across the North Korea border; warnings of the dangers of nuclear terrorism; admonishments of the rogue regimes in Pyongyang and Tehran.

But on his second day, Obama brought the light during his 3,700-word address at Hankuk. To further emphasize the choice faced by North Korea’s rulers — engaging with the outside world on a path toward prosperity or withdrawing further on its way toward self-implosion — Obama held up the example of the Hermit Kingdom’s prosperous sister to the south.

The president referred to the South as a “modern miracle,” one of the world’s “most dynamic economies” that sprang from the ashes of war, crushing poverty and its own authoritarian regime to a modern reality of “thriving democracy” and “a truly global Korea.”

“So to all the students here today,” Obama said, bypassing the silver-haired older folks on folding chairs to directly address the dark-haired masses in the bleacher seats, “this is the Korea your generation will inherit.”

In addition to having the world’s highest percentage of online households, South Korea also has a dynamic popular culture whose soap operas and pop music acts are among the most celebrated and successful in Asia. Obama made note of that when he cited “hallyu,” the Korean word for the spread internationally of its pop culture.

Leading up to the president’s appearance at the university, the White House had engaged the Hankuk student body in an online “Ask President Obama” contest in which questions were submitted through social media channels. The top 10 questioners received autographed copies of his book “The Audacity of Hope,” and the top three got hand-written responses from the president.

Among the three winners was a student who asked Obama why he often cites South Korea in speeches.

“Korea’s success is a tribute to the sacrifices and tenacity of the Korean people,” Obama replied. “You show what can be achieved when people come together, educate their children, stand up for their values and pursue a positive vision for their country.”

It was a stark juxtaposition to the way Obama had talked of North Korea a day earlier after peering through binoculars at the untamed shrubbery in the desolate nation during a tour of a United Nations checkpost in the demilitarized zone that separates the divided peninsula along the 38th parallel.

“It’s like you’re in a time-warp,” Obama said, when asked at a news conference about his impressions. “It’s like you’re looking across 50 years into a country that has missed 40 to 50 years of progress.”

At Hankuk, Obama guided the young students back in time across those five decades to the generations of their parents and grandparents when the Korean War left a country divided in its wake.

But, he said firmly, Koreans are “one people,” and he compared their future to that of another land once torn apart.

“Today, the people of Germany are whole again — united and free,” Obama said. “The currents of history cannot be held back forever. The deep longing for freedom and dignity will not go away. So, too, on this divided peninsula, the day all Koreans yearn for will not come easily or without great sacrifice. But make no mistake, it will come.”

And then the president descended the podium and made his way to a ropeline to pose for pictures with the students, who held their smart phones and iPads aloft to snap images that would be posted on their online social media networks for all the world — well, almost all — to see.