HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 3. HEAD SETS THE STAGE 25


language, but each browser will still do its best. They will not always do
the same thing, though.


XHTML:After HTML4, many in the web community moved to XHTML,
which tried to tighten standards but was frustrating and not widely ac-
cepted.


HTML5:After that failure, HTML5 went the other way and did not require
things that could be reasonably inferred or implied by context. We find
this with some older features of the HTML language, such as head, body,
paragraph, list items, and table rows, where the endings (and sometimes
beginnings) can be accurately inferred.


Trust:As web designers, if we want our content to be displayed in a partic-
ular way, we need to convince the browser that we know what we are doing.
Do not break any important rules of the language. Then the browser will
trust us. But if we do break rules, the browser will do what it thinks we
want instead of what we actually requested. And different browsers may
think differently.


We want search engines to trust us, too.


We should provide web content that follows the official rules of the HTML
language. That way we increase our chances that all browsers will display
our content in the same way, the way that we want and intend.


To do this, we must properly introduce our webpage, and provide it with a
designated head and body.


3.3 Validation


Writing in a precise language can be tricky, and it is helpful to have some
way to find out whether the things we are writing follow the rules.


Fortunately, there are some tools called validators that will look at our
webpage and tell us whether it needs to be fixed.


W3C is the standards body that develops standards for the World Wide
Web. http://www.w3.org/is their homepage. Their materials are official
and authoritative.


W3C does not try to provide tutorials and guides for novices, but instead
caters to the detailed and precise needs of experts.

Free download pdf