HTML and CSS Reference
In-Depth Information
What's new in HTML5?
At this point, you may be asking yourself, “What, really, is new in HTML5?” To begin
with, it's worth noting that HTML was originally conceived of as a markup language for
presenting text documents, not as an application development platform. However, over
time, more and more functionality has been squeezed into the web browser. HTML5 has
first and foremost attempted to consolidate, document, and add to the features added to
the language over the past decade. Some of the main changes are described in the fol-
lowing sections.
Backward-compatibility
HTML5 is compatible in most cases with previous forms of HTML syntax and tags.
How is this new? Well, for years a “standards-based” approach to web authoring was
emphasizing a transition away from HTML syntax toward XHTML syntax. As dis-
cussed in the history section, HTML5 has moved the emphasis away from a syntactic-
ally “pure” XML-based approach and instead moves the emphasis toward better docu-
mentation of the practices already in use.
Error handling
While web page authors may write documents any way they are familiar with, pretty
much, a major change in HTML5 has been directed toward user agents (web browser
manufacturers), not authors. Web browsers attempt to render HTML code, whatever it
may look like. Because of the flexibility of HTML in practice, the code can be ambigu-
ous in its structure at times. In the past, web browser manufacturers approached am-
biguous code differently and implemented different algorithms for how to handle the
ambiguous HTML (termed tag soup ). This led to inconsistencies in appearance across
different browsers. One obvious approach toward solving this issue is to make the lan-
guage stricter so web page authors are forced to structure their pages a certain way. This
was the thought and effort behind XHTML1. x ; however, another approach is to stand-
ardize how errors are handled on the browser implementator's side. This is what HTML5
seeks to do. It seeks to finally document how variations in syntax should be handled.
Web browsers have two choices when dealing with a parsing error: either implement the
rules specified in the HTML5 specification or abort processing the document at the first
error. The idea is that different browsers will consistently handle the same errors, and
those that do not implement the error-handling behavior will stop parsing the HTML,
thus notifying the author of an issue with their syntax.
Search WWH ::




Custom Search