Kate Middleton and Prince William
Kate Middleton and Prince William visited a school in north London recently. Pictured: Prince William and Kate leave after attending the Christmas Day service at church in Sandringham, eastern England, December 25, 2015.Reuters

Kate Middleton and her husband Prince William's recent appearance at Stewards Academy, a north London school, will be remembered as an inspiring visit. However, for 15-year-old Hannah, the British royals' presence at her alma mater is an event she'll remember for the rest of her life.

Hannah, who was asked to deliver a speech in front of the Duke and Duchess of Cambridge, battled nerves and later recounted the experience to Prince William's wife. In response, Middleton imparted an important life lesson.

The mother-of-two asked Hannah to continue performing and chase her dreams. People quoted the student as saying, "That is going to stay with me for the rest of my life. I think the fact that they came here is going to help a lot of people be able to speak up about how they're feeling."

Middleton, 34 and Prince William, 34, spoke about the importance of students' mental health and educators' role in helping them through difficult times.

Prior to his visit, the Duke of Cambridge wrote a lengthy blog post for Heads Together and highlighted the emotional struggle that students often face at the start of each academic year.

In his post, Prince William wrote, "By encouraging children to talk and to get support, we could stop these feelings developing into more serious problems that continue into adulthood. We all need someone to turn to at some point in our lives – even if it's an anonymous phone line or web-chat service; or a friend, teacher or family member."

The royals' visit to the north London school was part of their new mental health initiative, the Heads Together campaign, which seeks to diminish the stigma surrounding mental health problems.

Many students at Stewards Academy felt encouraged by the Duke and Duchess of Cambridge's initiative. Klaudia, 12, said, " They said to keep doing what we're doing and not give up and not listen to what other people say."

Prince William and Middleton will now travel to Canada on a seven-day royal tour.