Districts may make bylaws, not repugnant to law, concerning habitual truants and children between the ages of 6 and 18 years not attending school or who are not participating in an alternative learning plan under N.H. Rev. Stat. § 193:1, I(h), and to compel the attendance of such children at school; failure to comply with such bylaws shall constitute a violation for each offense.