The 17-strong group of Year 10 boys at Whitchurch High School raised eyebrows when they were seen in the morning striding around the school in borrowed skirts.
Despite rumours that the pupils had been sent home, headteacher Huw Jones-Williams told the Echo no-one had been punished.
He said: “We had a conversation with some boys this morning and they have worn trousers.”
Protester Tyrone Evelyn, 15, of Bala Road in Whitchurch, said the group would continue campaigning for a change.
He said: “It’s just appropriate for the weather – we don’t want to be hot and bothered. Over the last few days I’ve had a few headaches and skin irritations because I’ve been too hot.
“Girls can wear skirts, so I don’t see why we can’t wear shorts. It’s a reasonable protest.”
Tyrone and his friends wore trousers to school with skirts stowed in their bags after they suspected some teachers had got wind of their protest, which they planned on Facebook.
They then nipped into the loos and changed, before taking to the school corridors chanting, “We want to wear shorts”.
But he said their protest came to an abrupt end when they were marched into the headmaster’s office.
The boys now plan to write to their student council, in the hope the uniform will be changed for next summer.
Tyrone’s mum Andrea John, 51, said she would be happy to buy school shorts, adding: “It should be optional to wear three-quarter length shorts. It would cost exactly the same as if they wore trousers.”
The boys’ protest comes a month after train drivers in Sweden made international headlines by wearing skirts to work to protest against a policy that stopped them wearing shorts.
Train company Arriva has since capitulated and changed its policy to say all their drivers can wear trousers, shorts or skirts.
Last week, boys at Gowerton Comprehensive in Swansea also donned skirts in a similar protest, which was backed by several parents.
Questioned about his school’s strict uniform rules, which ban boys from wearing shorts but allow girls to choose between skirts or trousers, Mr Jones-Williams said no changes could be made without a consultation, but added the school was carrying out risk assessments to ensure children are coping with the heat.
Asked if Whitchurch could, like other schools in Cardiff, allow boys to wear PE shorts in class when the weather is extremely hot, Mr Jones-Williams said: “I can’t comment on what other schools are doing.”
He said the risk assessment includes visits to every classroom to check on how students are coping in the heat and to hand out bottles of water.
He said the school would continue to enforce its “strict uniform policy”, but also “monitor the weather conditions”.
He added: “People have obviously indicated that they would want to wear shorts. We are always keen to listen to our students.”
Labour councillor for Whitchurch, Jonathan Evans – who is also a governor at the school – admitted that when he was in young he led protests over having to wear school ties. But he said it is important Mr Jones-Williams is able to make his own decisions over discipline issues.