It's as important for the updated best practice to be taught to novices, and as important for industry leaders (such as Facebook[1]) to update their current code, which reflects the first (outdated best practice) example in the article.
You might argue that the HTML 5 Boilerplate[1] is a good starting place for learning about best practices. The code & accompanying site contain a lot of comments that explain why things are the way they are.
Problem is, of course, that the technologies used by a common page nowadays go far beyond the stuff present in H5B.
[1]: https://developers.facebook.com/docs/javascript/quickstart/v...