Browser Languages

     

You can certainly use Dreamweaver MX 2004 to create great-looking, functional Web sites without ever editing a single line of code. A big part of Dreamweaver's appeal is that you can lay out your work in an interactive, WYSIWYG fashion (What You See Is What You Get), and let Dreamweaver work behind the scenes to build the underlying HyperText Markup Language ( HTML ) that tells the browser how to draw the page.

When you get deeper into the program, however, you come to realize that certain operations are easier when you know a bit about HTML and its more recent successor, Extensible HTML ( XHTML ). For example, if you've already developed some facility with HTML, you may prefer to write or fine-tune parts of your Web pages directly in Dreamweaver's Code View. You may also have HTML code that you've already written and that you'd like to bring into Dreamweaver for editing and reuse. You may want to understand some of the differences between "bad" HTML and "good" ( well- formed ) HTML so that your pages work more predictably. Or you may just want to bring your Web code up to a more structured standard (XHTML) for better future upgradability and compatibility. In all these situations, and more besides, some familiarity with HTML and XHTML will stand you in good stead, even if you never become fluent, per se, in these languages.

Beyond HTML, and its evolutionary offspring XHTML, modern browsers (version 4 and higher) speak yet another language: CSS , short for Cascading Style Sheets . CSS started life as a way to bring some typographical flexibility to the admittedly boring HTML world. With CSS, you can specify fonts, point sizes, text colors, borders, backgrounds, indents, wrapping behaviors, and so on. Even better, you can create style definitions ”combinations of attributes that you'd like to reuse without redefining each time.

Another very important aspect of CSS is its capability to create layers , regions on a Web page with precise dimensions and location. Layers (also called CSS layers ) are actually nothing more than <div> tags with CSS positioning attributes, and that precise positioning feature is one of the key advantages that layers have over HTML tables. Layers give the Web designer a great option for page design when HTML tables just don't cut the mustard ”even the enhanced table-mode layouts that programs such as Dreamweaver make so convenient .

CSS layers do have their problems. If you want maximum backward compatibility, HTML tables are still the way to go. Also, not every designer likes working with CSS layers, for they can be complex and a bit idiosyncratic in terms of how they behave in different browsers. However, Macromedia is so taken with them that the company has laced Dreamweaver MX 2004 with new CSS- related page layout features, not least of which is the opportunity to choose from a variety of attractive predefined CSS page designs. Dreamweaver MX 2004 also makes it easier than ever to apply and edit CSS styles, even if creating those styles still involves a certain amount of tedium. In addition, this latest Dreamweaver displays CSS layers and layouts with greater accuracy than prior versions did.

Clearly, Dreamweaver MX 2004 reflects a strong commitment on Macromedia's part to giving CSS styles and layers a higher profile, and the new user interface tools go a long way toward minimizing the headaches of using CSS.

Macromedia and Markup

Macromedia Dreamweaver was one of the first Web design tools to ensure that users can customize the way the program manages markup. The term Roundtrip HTML emerged to describe the ability to move HTML documents between editors, within Dreamweaver, and within Dreamweaver views with limited or no changes being made to your markup.

However, sometimes "improving" HTML is even more important than maintaining its original structure and format. Dreamweaver has some built-in facilities for correcting HTML so that it more closely follows W3C-recommended markup approaches. Doing so creates consistency between documents, saving time and frustration when trying to find errors within a document. What's more, when multiple people are working on a site, adhering to standard practices creates a much more efficient work environment. Documents become more interoperable, reducing testing time and increasing portability. Documents conforming to W3C recommendations pay attention to the needs of the disabled, ensuring that the information within them can be easily accessed and clearly understood . Formal markup also provides a means by which documents can be prepared to display in a variety of languages using different character sets.

As the world moves from Web to wireless and alternative means of accessing Web-based data, clean markup becomes an imperative. Markup adhering to current recommendations and approaches can easily be interpreted by a much wider range of user agents beyond the browser ”making your information very widely accessible.

Origin of the Species: SGML, HTML, XML, and XHTML

To understand HTML, step back to its parent markup language, the Standard Generalized Markup Language (SGML). SGML has been around for years and became a standard for document markup specialists in government, medicine, law, and finance. SGML is a meta-language , that is, a collection of language rules that authors use to create their own document languages.

HTML is one of those resulting languages. From SGML, HTML took its structure, syntax, and basic rules. However, HTML ”even in its current seemingly complex state ”is much less complex and detailed than SGML. Especially in its early life, HTML was very simple. It existed to allow for some very basic markup of pages for the Web: paragraphs, line breaks, and headers. Remember, the Web was first a text-only environment. HTML was not developed with detailed presentation concerns in mind; rather, its goal was the simple structuring of data.

Enter the visual browser, which changed the Web environment from one constructed of text documents to one promising growing opportunities for visual design. HTML ”and Web browsers themselves ”were stretched out of proportion to accommodate the rapid-fire pace of the Web's visual and interactive growth. Designers were naturally more concerned with creating designs that were visually rich and aesthetically pleasing.

Trying to manipulate HTML to get it to do what you want is pretty frustrating. There are no consistent methods for creating layout. You have little control over whitespace ”relying on workarounds such as single-pixel spacer GIFs ”and there's essentially no stable way to manage type within HTML itself. HTML illustrates that the Web was never intended to be a visual environment. But it became one, and how to manage that reality has been a challenge ever since.

Another child of SGML is XML, the Extensible Markup Language. XML is also a meta-language and exists as a means of creating other languages. Although SGML is complex and detailed, XML is a streamlined meta-language suitable for creating Web markup languages that are customizable and flexible for the needs of specific applications. Examples of XML markup applications include Scalable Vector Graphics (SVG), Synchronized Multimedia Integration Language (SMIL), and Wireless Markup Language (WML).

People working on the evolution of markup languages via the W3C began to look at HTML and the problems it was facing because of this stretching and manipulating to accommodate design. HTML had become in many ways a linguistic mess. So, work was done to take the best of HTML and apply the strength and logic of XML. From this work came a new, refined markup language, the Extensible Hypertext Markup Language (XHTML).

XHTML is the reformulation of HTML as an XML application. The rules and methodologies of XML are applied to HTML, bringing syntactical strength back into HTML, which lost that strength during its rapid evolution from text document markup language to the de facto language of visual design. XHTML brings markup a lot closer to the interoperable, accessible, international, and growth-oriented goals mentioned at the beginning of this chapter.



Using Macromedia Studio MX 2004
Special Edition Using Macromedia Studio MX 2004
ISBN: 0789730421
EAN: 2147483647
Year: N/A
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net