What rights do students have under U.S. law to protest?

On Wednesday, students across the country are planning to walk out of class for 17 minutes, from 10 a.m. to 10:17 a.m., to protest gun violence and urge lawmakers to pass gun-control measures.

The 17 minutes mark the lives of the 17 people killed by a gunman Feb. 14 at Marjory Stoneman Douglas High School in South Florida. Young people around the country have pledged to participate, sometimes with support from school administrators. A few other marches have been called in the wake of the Stoneman Douglas shootings, including one by student survivors.

Here is what the American Civil Liberties Union, a nonprofit organization that works to defend individual rights, says students can and cannot do regarding protests during school hours — and what they can expect if they violate school rules:

Students’ Free Speech Rights in Public Schools
If you are a public school student, you do not check your constitutional rights at the schoolhouse doors. Whether schools can punish you for speaking out depends on when, where, and how you decide to express yourself.
Do I have First Amendment rights in school?
Yes. You do not lose your right to free speech just by walking into school. You have the right to speak out, hand out fliers and petitions and wear expressive clothing in school — as long as you do not disrupt the functioning of the school or violate the school’s content-neutral policies.
What counts as “disruptive” will vary by context, but a school disagreeing with your position or thinking your speech is controversial or in “bad taste” is not enough to qualify. Courts have upheld students’ rights to wear things like an antiwar armband, an armband opposing the right to get an abortion and a shirt supporting the LGBT community. “Content-neutral policies” mean rules that have nothing to do with the message you are expressing, like dress codes. So, for example, a school can prohibit you from wearing hats — because that rule is not based on what the hats say — but it cannot prohibit you from wearing only pink pussycat hats or pro-NRA hats.
Can my school discipline me for participating in a walkout?
Yes. Because the law in most places requires students to go to school, schools can discipline you for missing class. But what they cannot do is discipline you more harshly because of the political nature of or the message behind your action.
The exact punishment you could face will vary by your state, school district and school. Find out more by reading the policies of your school and school district. If you are planning to miss a class or two, look at the policy for unexcused absences. If you are considering missing several days, read about truancy. Either way, take a look at the policy for suspensions. In some states and districts, suspension is not an available punishment for unexcused absences. And nationwide, if you are facing a suspension of 10 days or more, you have a right to a formal process and can be represented by a lawyer. Some states and school districts require a formal process for fewer days, too. Also, you should be given the same right to make up work just as any other student who missed classes.
Find out the rules so you can tell if they are being applied differently when it comes to your walkout.
What about for protesting away from school?
Outside of school, you enjoy essentially the same rights to protest and speak out as anyone else. This means you are likely to be most protected if you organize, protest and advocate for your views off campus and outside of school hours.
What are my rights on social media?
You have the right to speak your mind on social media. Your school cannot punish you for content you post off campus and outside of school hours that does not relate to school. Some schools have attempted to extend their power to punish students even for off-campus, online posts. While courts have differed on the constitutionality of those punishments, the ACLU has challenged such overreach.

Here is a video with more: