HTML 5 syntax
One advantage XHTML has over HTML is that it has simpler syntax rules. If you want your documents to validate you canât pick and choose â" you need to use lowercase for tag and attribute names, close all elements, quote all attribute values, and give all attributes a value.
Some find those rules restrictive. I find them extremely useful since they give developers less room for coding choices that are mostly aesthetic but make collaboration and maintenance harder and slower.
HTML 5 does not have the same syntax rules as XHTML. It allows you to pick and choose â" you can mix tag and attribute case as you wish, quote some attribute values but not others, and leave out closing (and in some cases opening) tags for some (but not all) elements.
Posted in HTML 5, Productivity.
0 评论: to “ HTML 5 syntax ”
发表评论