Doctype - that mysterious tag at the top of everyone’s code that not a lot of us really understand. Sure, it’s supposed to be there, but just what the hell is it, and why?
Perhaps a good place to start is with the misconception that a lot of new web developers and designers have - that code is code and really, if it’s in ‘HTML’ then it should look fine anywhere, right? Not quite. First, we have a plethora of different browsers - Firefox, Internet Explorer, Safari, Opera, Lynx, the mobile versions of these, and a ton of secondary browsers (okay, if you’re still using Lynx, you’re a bit SOL). Following this whole browser variable, there are different languages you can code in, and I’m not referring to scripting. HTML isn’t the same as XHTML, and there are different modes for both. So how does the browser decide how to render each differently? By using doctypes!

Recent Comments