Scots pupils learn about web safety as part of UK-wide campaign
Education packs and tips handed out to teenagers after study reveals concerning figures.
Young people across Scotland have been getting involved in Safer Internet Day.
The national initiative aims to raise awareness about staying safe online and showing respect to other web users.
Recent research from the UK Safer Internet Centre, which is behind the drive, shows that four in five young people were affected by “online hate” in the last year.
The study of 13 to 18-year-olds, conducted by ResearchBods, found 94% said they believe no one should be subjected to online abuse.
Despite this more than four in five (82%) said they had seen or heard offensive or threatening behaviour targeted at or about someone based on their race, religion, disability, gender, sexual orientation or transgender identity.
Almost a quarter (24%) reported to have been the target of prejudice or so-called "trolling" online in the last year.
As a result, some young people are "self-censoring" with nearly three quarters (74%) saying that the incidents made them more careful about what they share online.
Aileen Campbell MSP, Scottish minister for children and young people, visited the Microsoft offices in Edinburgh and also spoke to pupils at the city's Craigmount High School on Tuesday to show her support.
She said: "With computers and tablets now firmly embedded in learning at Craigmount and other schools, we need to make sure we do all we can to promote safe and responsible use of these technologies in our education system and at home.
“At Microsoft I took part in a very useful discussion with the Child Exploitation and Online Protection Centre, Children First, Young Scot and the Safer Internet Centre about how we can work together within Scotland and respond to the changing risks associated with child online safety."
Education packs were distributed to schools across the country while a group of young people also went to 10 Downing Street to share their experiences of social media and online attitudes.
Will Gardner, a director of the UK Safer Internet Centre and chief executive of Childnet, said: “We were surprised and concerned to see that so many had been exposed to online hate in the last year. It is a wake-up call for all of us to play our part in helping create a better internet for all, to ensure that everyone can benefit from the opportunities that technology provides.”