HTML and CSS Reference
In-Depth Information
In other cases, you may need to use a tool to determine the parse mode:
Web developers should aim for a solid markup foundation that is parsed in a
predictable manner. The number of rendering oddities that will still be encountered even
with such a solid footing is not inconsequential, so it's best not to tempt fate and instead to
try to follow the “rules” of markup.
The Rules of (X)HTML
(X)HTML does have rules, of course, though in some versions the rules are somewhat loose.
Similarly, as previously discussed, these “rules” really don't seem like rules because most
browsers pretty much let just about anything render. However, quite certainly, you should
follow these rules, because malformed documents may have significant downsides, often
exposed only after other technologies like CSS or JavaScript are intermixed with the
markup. The reality is that most (X)HTML, whether created by hand or a tool, generally lies
somewhere between strict conformance and no conformance to the specification. This
section gives you a brief tour of some of the more important aspects of (X)HTML syntax
that are necessary to understand to produce well-formed markup.
HTML Is Not Case Sensitive, XHTML Is
These markup examples are all equivalent under traditional HTML:
<B> Go boldly </B>
<B> Go boldly </b>
<b> Go boldly </B>
<b> Go boldly </b>
In the past, developers were highly opinionated about how to case elements. Some designers
pointed to the ease of typing lowercase tags as well as XHTML's requirement for lowercase
elements as reasons to go all lowercase. HTML5 reverts back to case-insensitive markup and
thus we may see a return to uppercase tags by standards aware developers.
Search WWH ::

Custom Search