HTML and CSS Reference
In-Depth Information
All that is different in this example is that the <!DOCTYPE> statement is much simpler. In
fact, the specific idea of using SGML and performing validation does not apply to HTML5.
However, the syntax checking benefits of validation lives on and is now being called
conformance checking and for all intents and purposes is the same. Interestingly, because
of the statement in its shortened form, browsers will correctly enter into a standards
compliance mode when they encounter an HTML5 document:
In the next chapter, we'll see that HTML5 is quite a bit different than HTML 4 despite what
our “hello world” example suggests. There are many new tags and there is a tremendous
emphasis on interactivity and Web application development. However, probably the most
interesting aspect of HTML5 is the focus on defining what browsers—or, more widely, user
agents in general—are supposed to do when they encounter ill-formed markup. HTML5, by
defining known outcomes, makes it much more likely that today's “tag soup” will be parsed
predictably by tomorrow's browsers. Unfortunately, read another way, it provides yet more
reasons for those who create such a mess of markup not to change their bad habits.
Likely, the future of markup has more than one possible outcome. My opinion is that
those who produce professional-grade markup or who write tools to do so will continue to
embrace standards, XML or not, while those who dabble with code and have fun will
continue to work with little understanding of the rules they break and will have no worries
about doing so. The forgiveness that HTML allows is both the key to its popularity and,
ultimately, the curse of the unpredictability often associated with it.
HTML is the markup language for building Web pages and traditionally has combined
physical and logical structuring ideas. Elements—in the form of tags such as <em> and
</em> —are embedded within text documents to indicate to browsers how to render pages.
The rules for HTML are fairly simple and compliance can be checked with a process called
validation. Unfortunately, these rules have not been enforced by browsers in the past.
Because of this looseness, there has been a great deal of misunderstanding about the
purpose of HTML, and a good portion of the documents on the Web do not conform to any
particular official specification of HTML. Stricter forms of HTML, and especially the
introduction of XHTML, attempt to impose a more rigid syntax, encourage logical markup,
and leave presentational duties to other technologies such as Cascading Style Sheets. While
very widespread, use of strict markup has yet to occur on the Web. Web developers should
aim to meet standards to future-proof their documents and more easily address all the
various issues that will certainly arise in getting browsers to render them properly.
Search WWH ::

Custom Search