html doctypes
November 22nd, 2008
No comments
Something I learned from a frontend guru recently… always! always! always! have the doctype at the top of you web pages.
I was trying to debug a page that someone else wrote. The problem was that an “onclick” html event would not trigger. I was sure that the javascript syntax was correct. The guru’s first idea was that the doctype was set wrong. Sure enough, he was right, the original coder slid the doctype somewhere randomly in the code, way below the first line of the html code.
I’m not exactly looking forward to cleaning up all that crappy code.
Categories: HTML