HTML and CSS Reference
In-Depth Information
Unlike HTML and CSS, JavaScript is not a fault tolerant language. Any unsupported
methods or functions that appear in your JavaScript—even a simple syntax mistake—
will generate an error and bring the script to a screeching halt. Every part of a script
needs to be in working order or else the entire thing can fall apart. However, you can
incorporate checks and failsafes into your JavaScript to detect whether the browser
supports a given feature, and to fail gracefully if it doesn't. JavaScript is another
important layer in the progressive enhancement stack, but that's a subject for another
At every stage and with every new layer of enhancement you add, think about how the content will
degrade if and when that layer is stripped away. If removing a layer would make the content nonfunctional
or unusable, then perhaps you need to revise your strategy.
Working with HTML and CSS
Though HTML and CSS can seem overwhelming when you first dive in, creating your own web pages is
actually quite easy once you get the hang of it. All you really need is a way to edit text files, a browser to
view them in, and a place to store the files you create.
Choosing an Editor
HTML documents are plain text, devoid of any special formatting or style—all of the visual formatting
happens when a graphical web browser renders the document. To create and edit plain-text electronic
documents, you'll need to use software that can do so without automatically imposing any formatting of its
own. Fortunately, every operating system comes with some kind of simple text-editing program:
Windows users can use Notepad, which you will find under Start All Programs Accessories
Notepad. WordPad is another Windows alternative, but it will format documents by default. If you
use WordPad, be sure to edit and save your documents as plain text, not “rich text.”
Linux users can choose from several text editors, such as vi, vim, or emacs.
Mac users can use TextEdit, which ships natively with OS X in the Applications folder. Like
WordPad for Windows, TextEdit defaults to a rich-text format. You can change this by selecting
Format Make Plain Text.
In addition to these basic text editors, more advanced, specialized text editors are available for Windows,
Linux, and Macintosh systems, many specially designed for editing web documents. Some of them are
even available free of charge. There are also so-called What You See Is What You Get (WYSIWYG,
pronounced as “wizzy wig”) editors on the market that offer a graphical interface wherein you can edit
documents in their formatted, rendered state while the software automatically produces the markup behind
Search WWH ::

Custom Search