HTML and CSS Reference
In-Depth Information
HTML as an alternative, by starting with HTML content on the page and using JavaScript
to hide that content and present the Flash movie instead if the user has a browser that sup-
ports Flash. For example, many mobile devices do not support Flash. If you are building a
website for a restaurant in Flash, it makes sense to present essential information like the
restaurant's hours, location, and phone number in HTML, and then optionally hide that
information and replace it with your Flash movie if the Flash player is available. If it isn't,
users can still access the important information on the site.
This is what progressive enhancement is all about. It ensures that everyone with a
browser of any kind can view your site, while the site still provides an enhanced experi-
ence for those who can benefit from it.
Choosing a Document Type
In light of these different approaches to writing HTML, let's look at the current HTML
standards. The HTML 4.01 and XHTML 1.0 definitions include three flavors of HTML,
and the main differences between HTML 4.01 and XHTML 1.0 have been noted
throughout this topic. The most important of them is that XHTML documents must be
valid Extensible Markup Language (XML) , whereas that is not required for HTML 4.01.
The three flavors are as follows:
HTML 4.01 or XHTML 1.0 Transitional is geared toward the web developer
who still uses deprecated tags rather than migrating to CSS. For example, if you
want to write valid pages that include <font> tags, and attributes of the <body> tag
like bgcolor or text , this is your best bet.
HTML 4.01 or XHTML 1.0 Frameset is a strict specification that includes the
frame-related tags. You should use this standard when you're writing framed pages.
HTML 4.01 or XHTML 1.0 Strict is for people who don't have deprecated tags
in their documents. This specification basically mandates that tags are used strictly
for page structure, and that all your look-and-feel modifications are accomplished
using CSS.
Most web developers stick with the XHTML standard that is most applicable to them,
with a strong preference toward XHTML 1.0 Strict. At one time, significant differences
existed between browsers in terms of the tags they supported. These days, all the
browsers support an almost identical set of tags. Instead, the differences lie mainly in
how they deal with CSS. Regardless of the strategy you use for creating content, the key
to making sure everything works is to test it as widely as possible. If you're concerned
about how your page looks in Internet Explorer 6, test it in Internet Explorer 6. After a
Search WWH ::

Custom Search