One of the classes I’ve been teaching at UNM Continuing Ed lately is Beginning Dreamweaver. The school uses Adobe Creative Suite 4 in the lab where I teach. The DOCTYPE options in DW 4 are either transitional or strict in HTML 4/XHTML 1.0.
Outside of the UNM lab, the most recent version of DW on the market is 5.5, which includes the HTML5 DOCTYPE. If the students go out and buy a commercial version of DW, they will get 5.5 and the option to choose HTML5.
Which means, when we look at the options for creating a new page in DW, we have to include HTML5 in the discussion of which DOCTYPE to choose, even though it isn’t there in the school’s DW 4 options.
Back in March, I wrote Syntax Style for HTML 5: Some Best Practice Recommendations. To summarize that article, the syntax style most like what was recommended for HTML was similar to the syntax for HTML 4.01 Strict.
I’ve been telling students two things about DOCTYPES. First, I tell them that it doesn’t really matter which one they pick as long as they pick one, because any one they pick will keep them out of quirks mode. Dreamweaver will correctly write the HTML for what ever they choose. Secondly, I tell them that if they are thinking of using HTML5 in their future work, to choose HTML 4. That instruction always feels oddly retro – go back to an older technology and forget about dealing with the seemingly more modern XHTML.
In my mind, the seemingly more modern XHTML has two drawbacks. First, it’s been abandoned by the W3C and won’t been updated. Second, the syntax for HTML 4 Strict seems a much better choice when working in HTML 5 because there’s no need to talk about XML and trailing slashes in empty elements and other things that don’t apply to HTML5. And HTML 4 Strict syntax rules match up with what was recommended as a best practice for writing under the new anything-goes rules of HTML5.
What DOCTYPE are you telling students to use these days?
2 thoughts on “What are you telling students about DOCTYPES?”
When preparing to teach my web app dev course this past semester (Spring 2011), I thought long and hard about this. In the end, I decided to stick with XHTML 1.0 Strict, which is what I’ve taught in the past. My primary reason for this was that the block and inline syntax rules, paired with my mandate that all markup must validate for credit, make teaching layouts in CSS *really* easy. There are other reasons, like deprecated elements and attributes that I didn’t want the students using/abusing, but given I had all of 2 weeks to teach CSS, I needed to ensure the students would have a good markup foundation to be successful. And I’ve found this to work great in the past and it did again.
I had a few students who went further and started experimenting with HTML5 and, as I’ve seen in the past with HTML 4.01 Transitional, once they omit closing tags or start doing odd things with nested block and inline elements, their CSS blows up and they’re suck on how to fix it. Not that this isn’t a good experience to have — learning to debug these scenarios is useful — but it often harms their confidence and slows their learning.
I’m already thinking ahead to the next time I teach the class and wondering what I will do. I know I’ll have to teach HTML5, but what rules and tools can I offer that continue to facilitate easy learning of CSS?
NB: The course I teach is an applied Computer Science class at a 4-year liberal arts institution. I have 14 weeks to cover the full stack and the students must produce a working web app by the end of the semester.
Thanks for your input, Kimberly.
One thing that concerns me about a brief continuing ed class in beginning Dreamweaver is the CSS issue. Even if DW 5.5 does include an HTML5 DOCTYPE option, the students won’t know what to do with the CSS to display it. I haven’t had a look at DW 5.5, I can only hope that maybe some of the prebuilt layouts that come with DW attempt to provide some CSS for HTML5 elements.