I'm glad he gave you detention. You're lucky society is too weak to slap you for your insolence. Imagine working for Pixar one day and they say you have to script up something using this format. You thinking you're better off with dreamweaver and use that instead. You finish your work, it's reviewed and they find out it can't work with most of what everyone else has used. You wasted a lot of time and money by not following directions. Instant departure from a good paying job.
You may think it's stupid and trivial now, but even the smallest things in life can teach you a rather large lesson.